José Quiñones Flores 4564da0130 Added Laravel project and removed sensitive data | 4 years ago | |
---|---|---|
.. | ||
lib | 4 years ago | |
maps | 4 years ago | |
test | 4 years ago | |
.travis.yml | 4 years ago | |
LICENSE | 4 years ago | |
index.js | 4 years ago | |
package.json | 4 years ago | |
readme.md | 4 years ago |
En- & decoder for XML/HTML entities.
U
)entities
npm i entities
entities
//encoding
require("entities").encode(<str> data[, <int> level]);
//decoding
require("entities").decode(<str> data[, <int> level]);
The level
attribute indicates what level of entities should be decoded (0 = XML, 1 = HTML4 and 2 = HTML5). The default is 0 (read: XML).
There are also methods to access the level directly. Just append the name of the level to the action and you’re ready to go (e.g. encodeHTML4(data)
, decodeXML(data)
).
License: BSD-like