entity-decode

2.0.2 • Public • Published

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.2
    2,105
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.2
    2,105
  • 2.0.1
    1
  • 2.0.0
    1
  • 1.0.1
    0
  • 1.0.0
    1

Package Sidebar

Install

npm i entity-decode

Weekly Downloads

1,703

Version

2.0.2

License

MIT

Unpacked Size

3.35 kB

Total Files

6

Last publish

Collaborators

  • shrpne