JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2955
  • Score
    100M100P100Q119545F
  • License MIT

Enviroment agnostic entity decoder

Package Exports

  • entity-decode
  • entity-decode/browser

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (entity-decode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.