most-router
A basic router made to be used in conjunction with most-history built on top of switch-path.
Installing
$ npm install --save most-router
Basic Usage
const push stream = const router = ; const routes = '/': renderHome '/about': renderAbout '*': renderNotFound const match$ = router const view$ = match$ view$routes$
Router Instance API
path(pathname): Router
Creates a new router that is namespaced by pathname, in other words it creates nested router instance.
define(routes): Stream<{path, value, location}>
Returns a stream of objects that contain the current matched path and the value associated with that path, as well as the current location.