JSPM

  • Created
  • Published
  • Downloads 99502113
  • Score
    100M100P100Q261944F
  • License BSD-like

Encode & decode XML/HTML entities with ease

Package Exports

  • entities
  • entities/lib/decode
  • entities/lib/decode_codepoint
  • entities/lib/decode_codepoint.js
  • entities/lib/encode
  • entities/maps/entities.json
  • entities/maps/legacy.json
  • entities/maps/xml.json

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 (entities) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

#entities NPM version Downloads Build Status Coverage

En- & decoder for XML/HTML entities.

##How to…

###…install entities

npm i entities

###…use entities

var entities = require("entities");
//encoding
entities.encodeXML("&");  // "&"
entities.encodeHTML("&"); // "&"
//decoding
entities.decodeXML("asdf & ÿ ü '");  // "asdf & ÿ ü '"
entities.decodeHTML("asdf & ÿ ü '"); // "asdf & ÿ ü '"

License: BSD-like