Crossing
Crossing is JavaScript URL utility library that aims to help you manage and generate dynamic urls.
Install
npm install crossing
Basic Use
var Crossing = ; // create your crossing instance var urls = ; // load your url list urls; // get a url var path = urls; // -> /teams/lincolnloop/ // resolve a path to get the url name and attrs var urlName = urls; // -> {'name': 'discussion:detail', 'kwargs': {'team_slug': 'loop', 'discussion_id': 23, 'slug': 'discussion-name'}}
That's all there is to it! Enjoy!
Run Tests
npm test