New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

routemachine

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

routemachine

Stateful client-side router

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

routemachine

Stateful client-side router

Install

Browserify:

npm install routemachine

Component:

component install scttnlsn/routemachine

Usage

var routemachine = require('routemachine');
var router = routemachine();

var foo = {
    url: '/foo',

    enter: function () {
        console.log('enter foo');
    },

    exec: function () {
        console.log('exec foo');
    }
};

var bar = {
    url: '/foo/bar',

    enter: function () {
        console.log('enter bar');
    },

    exec: function () {
        console.log('exec bar');
    },

    exit: function () {
        console.log('exit bar');
    }
};

router.define(function (root) {
    root.define('foo', foo, function (foo) {
        foo.define('bar', bar);
    });
});

router.navigate('/foo/bar');
// => enter foo
// => enter bar
// => exec bar
router.navigate('/foo');
// => exit bar
// => exec foo

Keywords

route

FAQs

Package last updated on 09 Feb 2014

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