You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.3 KiB

4 years ago
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var decode_1 = require("./decode");
  4. var encode_1 = require("./encode");
  5. function decode(data, level) {
  6. return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data);
  7. }
  8. exports.decode = decode;
  9. function decodeStrict(data, level) {
  10. return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data);
  11. }
  12. exports.decodeStrict = decodeStrict;
  13. function encode(data, level) {
  14. return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data);
  15. }
  16. exports.encode = encode;
  17. var encode_2 = require("./encode");
  18. exports.encodeXML = encode_2.encodeXML;
  19. exports.encodeHTML = encode_2.encodeHTML;
  20. exports.escape = encode_2.escape;
  21. // Legacy aliases
  22. exports.encodeHTML4 = encode_2.encodeHTML;
  23. exports.encodeHTML5 = encode_2.encodeHTML;
  24. var decode_2 = require("./decode");
  25. exports.decodeXML = decode_2.decodeXML;
  26. exports.decodeHTML = decode_2.decodeHTML;
  27. exports.decodeHTMLStrict = decode_2.decodeHTMLStrict;
  28. // Legacy aliases
  29. exports.decodeHTML4 = decode_2.decodeHTML;
  30. exports.decodeHTML5 = decode_2.decodeHTML;
  31. exports.decodeHTML4Strict = decode_2.decodeHTMLStrict;
  32. exports.decodeHTML5Strict = decode_2.decodeHTMLStrict;
  33. exports.decodeXMLStrict = decode_2.decodeXML;