1.0.3 • Published 5 years ago

fast-routes v1.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Fast Routes

GitHub license npm version Coverage Status

Javascript routing for single page applications.

Installing

yarn add fast-routes
npm install fast-routes

Usage

import {Router} from 'fast-routes';

// create router with parameter root url
const router = new Router('/');

// add some route that have url name and function
router.add('home', 'homePage', () => {
  console.log('home route');
});

// listen for routing
router.listen();
<!-- You must add 'fast-route' class for routing -->
<a href='homePage' class='fast-route'> Home </a>
<a href='contactPage' class='fast-route'> Contact </a>

Also see full express app example that uses fast-routes.

Built With

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details.

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago