Skip to content

NightlyCommit/routee

Repository files navigation

routee

NPM version Build Status Coverage percentage

The last router you'll ever need.

Installation

npm install routee

Usage

import {registerRoute, createURL, dispatch} from "routee";

const fooRoute = registerRoute('foo', ['id', 'name'], ({id, name}) => {
    // this is the route executor
});

// create an URL from a route and its parameters
createURL(route, {
    id: '1',
    name: 'Bob'
});

// dispatch a location
const dispatchedRoute = dispatch('foo/bar/id/1/name/lorem');

API

Read the documentation for more information.

Contributing

  • Fork the main repository
  • Code
  • Implement tests using tape
  • Issue a pull request keeping in mind that all pull requests must reference an issue in the issue queue

License

Apache-2.0 © Eric MORAND

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published