a-dispatcher

1.0.1 • Public • Published

a-dispatcher

Just a simple url-dispatcher you can use with regex

npm install a-dispatcher --save
import Dispatcher from 'a-dispatcher';
import User from './user-info';
import Edit from './user-info';
 
const dispatcher = new Dispatcher();
 
dispatcher.addRoute('^/user', User);
 
dispatcher.addRoute('^/edit', Edit);
 
dispatcher.run(location.pathname);

Readme

Keywords

Package Sidebar

Install

npm i a-dispatcher

Weekly Downloads

4

Version

1.0.1

License

MIT

Last publish

Collaborators

  • appleple