entity-decode
Environment agnostic entity decoder
Last updated 8 years ago by shrpne .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install entity-decode 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 3.0.0                                ...           latest (2 years ago)

6 Versions

  • 3.0.0                                ...           2 years ago
  • 2.0.2                                ...           8 years ago
  • 2.0.1                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Total 12
Today 0
This Week 0
This Month 7
Last Day 0
Last Week 2
Last Month 1
Dependencies (1)
  • he ^1.1.1
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE