1.2.0 • Published 5 years ago
h3c v1.2.0
Installation
Via npm:
npm install h3cUse
In Node.js:
var h3c = require('h3c');API
h3c.decode(string)
This function takes a string and decodes any named and numerical character references in it using the algorithm described in section 12.2.4.69 of the HTML spec.
h3c.decode('foo © bar ≠ baz & qux');
// → 'foo © bar ≠ baz & qux'Unit tests & code coverage
After cloning this repository, run npm install to install the dependencies needed for he development and testing. You may want to install Istanbul globally using npm install istanbul -g.
Once that’s done, you can run the unit tests in Node using npm test or node tests/tests.js. To run the tests in Rhino, Ringo, Narwhal, and web browsers as well, use grunt test.
To generate the code coverage report, use grunt cover.
License
he is available under the MIT license.