source: trip-planner-front/node_modules/entities/lib/index.js@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 3.6 KB
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0;
4var decode_1 = require("./decode");
5var encode_1 = require("./encode");
6/**
7 * Decodes a string with entities.
8 *
9 * @param data String to decode.
10 * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.
11 * @deprecated Use `decodeXML` or `decodeHTML` directly.
12 */
13function decode(data, level) {
14 return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data);
15}
16exports.decode = decode;
17/**
18 * Decodes a string with entities. Does not allow missing trailing semicolons for entities.
19 *
20 * @param data String to decode.
21 * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0.
22 * @deprecated Use `decodeHTMLStrict` or `decodeXML` directly.
23 */
24function decodeStrict(data, level) {
25 return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data);
26}
27exports.decodeStrict = decodeStrict;
28/**
29 * Encodes a string with entities.
30 *
31 * @param data String to encode.
32 * @param level Optional level to encode at. 0 = XML, 1 = HTML. Default is 0.
33 * @deprecated Use `encodeHTML`, `encodeXML` or `encodeNonAsciiHTML` directly.
34 */
35function encode(data, level) {
36 return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data);
37}
38exports.encode = encode;
39var encode_2 = require("./encode");
40Object.defineProperty(exports, "encodeXML", { enumerable: true, get: function () { return encode_2.encodeXML; } });
41Object.defineProperty(exports, "encodeHTML", { enumerable: true, get: function () { return encode_2.encodeHTML; } });
42Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: true, get: function () { return encode_2.encodeNonAsciiHTML; } });
43Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return encode_2.escape; } });
44Object.defineProperty(exports, "escapeUTF8", { enumerable: true, get: function () { return encode_2.escapeUTF8; } });
45// Legacy aliases (deprecated)
46Object.defineProperty(exports, "encodeHTML4", { enumerable: true, get: function () { return encode_2.encodeHTML; } });
47Object.defineProperty(exports, "encodeHTML5", { enumerable: true, get: function () { return encode_2.encodeHTML; } });
48var decode_2 = require("./decode");
49Object.defineProperty(exports, "decodeXML", { enumerable: true, get: function () { return decode_2.decodeXML; } });
50Object.defineProperty(exports, "decodeHTML", { enumerable: true, get: function () { return decode_2.decodeHTML; } });
51Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });
52// Legacy aliases (deprecated)
53Object.defineProperty(exports, "decodeHTML4", { enumerable: true, get: function () { return decode_2.decodeHTML; } });
54Object.defineProperty(exports, "decodeHTML5", { enumerable: true, get: function () { return decode_2.decodeHTML; } });
55Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });
56Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });
57Object.defineProperty(exports, "decodeXMLStrict", { enumerable: true, get: function () { return decode_2.decodeXML; } });
Note: See TracBrowser for help on using the repository browser.