surrogate-cc-router-lib

Performs the routing between URL calls to comment card

Usage no npm install needed!

<script type="module">
  import surrogateCcRouterLib from 'https://cdn.skypack.dev/surrogate-cc-router-lib';
</script>

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