routing2

0.0.15 • Public • Published

routing2 routing2

Parse HTTP Routing definition

Define

Installation

$ npm install routing2

Example

const { parse } = require('routing2');
 
const routes = parse(`get /:name => home#index , a=1, b=2`);
 
console.log(routes); // ->
{
  method: 'get',
  path: '/:name',
  controller: 'home',
  action: 'index'
}

Contributing

  • Fork this Repo first
  • Clone your Repo
  • Install dependencies by $ npm install
  • Checkout a feature branch
  • Feel free to add your features
  • Make sure your features are fully tested
  • Publish your local branch, Open a pull request
  • Enjoy hacking <3

ISC

This work is licensed under the ISC license.


Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.15
    2
    • latest
  • 0.0.9
    1
    • next

Version History

Package Sidebar

Install

npm i routing2

Weekly Downloads

16

Version

0.0.15

License

MIT

Unpacked Size

57.8 kB

Total Files

9

Last publish

Collaborators

  • song940