encode & decode XML/HTML entities with ease
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib encode: don't try to encode commas Apr 15, 2014
maps renamed entities/ dir to maps/ Mar 17, 2014
test encode: don't try to encode commas Apr 15, 2014
.gitignore Add .gitignore Oct 21, 2018
.travis.yml Test on node LTS Oct 21, 2018
LICENSE added license Oct 12, 2012
index.js encode: fix `escape`, expose it Apr 13, 2014
package-lock.json 1.1.2 Oct 21, 2018
package.json 1.1.2 Oct 21, 2018
readme.md Fixing readme.md to have the same license as the package.json Jan 20, 2018

readme.md

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-2-Clause