Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

@nichoth/router

1.1.3 • Public • Published

router

Playing with client side routing again

var App = require('../')
 
var app = App({ hello: 'world' })
 
app.route('/', function root (app) {
    return function onMatch (params) {
        console.log('hello', app.hello)
        console.log('params', params)
    }
})
 
app.route('/foo', function foo (app) {
    return function onMatch (params) {
        console.log('foo match', params)
    }
})

install

npm i @nichoth/router

Downloadsweekly downloads

36

version

1.1.3

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar