History

Introduced in 3.0.0 as Breadcrumb Renamed to History in 4.0.0

Stability: 2 - Stable

const History = require('kado/lib/History')

This library provides user location tracking as they navigate the application and is useful for building breadcrumb services for preloading the browser local storage.

NOTE: This class requires session storage to be provided by the HyperTextEngine for use in the web server.

Class: History

static History.getInstance()

History.constructor()

History.all()

History.add(uri, name, icon)

History.save(req)

Saves the current history to the session is available through {req.session}

History.restore(req)

Restores the saves history from the session

History.middleware(app, req)

This middleware helper automatically reads incoming URIs and checks them against registered navigation entries to create a fancy history. Ignores non user friendly urls.

It also helps with the save and restoration through the session.