diff options
Diffstat (limited to 'node_modules/entities/index.js')
-rw-r--r-- | node_modules/entities/index.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/node_modules/entities/index.js b/node_modules/entities/index.js new file mode 100644 index 000000000..3353c1ab3 --- /dev/null +++ b/node_modules/entities/index.js @@ -0,0 +1,33 @@ +var encode = require("./lib/encode.js"), + decode = require("./lib/decode.js"); + +exports.decode = function(data, level){ + return (!level || level <= 0 ? decode.XML : decode.HTML)(data); +}; + +exports.decodeStrict = function(data, level){ + return (!level || level <= 0 ? decode.XML : decode.HTMLStrict)(data); +}; + +exports.encode = function(data, level){ + return (!level || level <= 0 ? encode.XML : encode.HTML)(data); +}; + +exports.encodeXML = encode.XML; + +exports.encodeHTML4 = +exports.encodeHTML5 = +exports.encodeHTML = encode.HTML; + +exports.decodeXML = +exports.decodeXMLStrict = decode.XML; + +exports.decodeHTML4 = +exports.decodeHTML5 = +exports.decodeHTML = decode.HTML; + +exports.decodeHTML4Strict = +exports.decodeHTML5Strict = +exports.decodeHTMLStrict = decode.HTMLStrict; + +exports.escape = encode.escape; |