Socket
Book a DemoInstallSign in
Socket

route-component

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

route-component

Route implementation for client-side routers

latest
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

route

Route implementation for client-side routers.

Installation

$ component install component/route

API

Route(path)

Initialize a Route with a path string or regexp.

Route#before(fn)

Add before fn used when the "page" is shown. This may be invoked any number of times.

Route#after(fn)

Assign after fn used to perform cleanup when an alternate "page" is shown. This may be invoked any number of times.

Route#call(type, [args])

Invoke callbacks of type with args array.

Route#match(path)

Match against the given path. Returns false or an array with params matched.

License

MIT

Keywords

route

FAQs

Package last updated on 16 Mar 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts