html-entity-decoder
v1.0.1
Published
replaces every html entity in a string with the corresponding unicode character
Downloads
207
Maintainers
Readme
html-entity-decoder
replaces every html entity in a string with the corresponding unicode character
Usage
First, install the package using npm:
npm install html-entity-decoder --save
Then, require the package and use it like so:
const decoder = require('html-entity-decoder');
console.log(decoder.feed('&qout;Hello, World!"')); // "Hello, World!"
console.log(decoder.feed('Foo © bar 𝌆 baz ☃ qux')); // Foo © bar 𝌆 baz ☃ qux
For more info, refer to tests.js in the source repository
License
MIT License