surrogate-cc-router-lib
v0.1.1
Published
Performs the routing between URL calls to comment card
Downloads
2
Readme
surrogate-cc-router-lib
A small library to resolve URL to comment card ids.
Installation
npm install surrogate-cc-router-lib --save
Usage
var scc_router_lib = require('surrogate-cc-router-lib'),
resolver = scc_router_lib.commentCardResolver({
"http://www.mydoomain.com/": 1234});
console.log(resolver.resolve("http://www.google.com"));
// => returns null
console.log(resolver.resolve("http://www.mydomain.com/index.html"));
// => returns 1234
Tests
npm test
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
Release History
- 0.1.0 Initial release