2.0.2 • Published 5 years ago

entity-decode v2.0.2

Weekly downloads
75,560
License
MIT
Repository
github
Last release
5 years ago

entity-decode

This purpose of this library is to provide a single interface to browser and node decode implementation.

It is using the following two underlying implementations:

  • Browser: micro decode implementation using browser's NodeElement.textContent method
  • Node: he

Example usage

// Load default implementation
var decode = require('entity-decode');

// Load specific version
var decode = require('entity-decode/browser') // browser version
var decode = require('entity-decode/node') // node version

decode('foo © bar ≠ baz 𝌆 qux') 
// returns 'foo © bar ≠ baz 𝌆 qux'

License

entity-decode is available under the MIT license.