diff options
author | RaindropsSys <raindrops@equestria.dev> | 2023-11-17 23:25:29 +0100 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2023-11-17 23:25:29 +0100 |
commit | 953ddd82e48dd206cef5ac94456549aed13b3ad5 (patch) | |
tree | 8f003106ee2e7f422e5a22d2ee04d0db302e66c0 /includes/external/addressbook/node_modules/domutils/lib/stringify.js | |
parent | 62a9199846b0c07c03218703b33e8385764f42d9 (diff) | |
download | pluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.tar.gz pluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.tar.bz2 pluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.zip |
Updated 30 files and deleted 2976 files (automated)
Diffstat (limited to 'includes/external/addressbook/node_modules/domutils/lib/stringify.js')
-rw-r--r-- | includes/external/addressbook/node_modules/domutils/lib/stringify.js | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/includes/external/addressbook/node_modules/domutils/lib/stringify.js b/includes/external/addressbook/node_modules/domutils/lib/stringify.js deleted file mode 100644 index 006d61b..0000000 --- a/includes/external/addressbook/node_modules/domutils/lib/stringify.js +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.innerText = exports.textContent = exports.getText = exports.getInnerHTML = exports.getOuterHTML = void 0; -var domhandler_1 = require("domhandler"); -var dom_serializer_1 = __importDefault(require("dom-serializer")); -var domelementtype_1 = require("domelementtype"); -/** - * @category Stringify - * @deprecated Use the `dom-serializer` module directly. - * @param node Node to get the outer HTML of. - * @param options Options for serialization. - * @returns `node`'s outer HTML. - */ -function getOuterHTML(node, options) { - return (0, dom_serializer_1.default)(node, options); -} -exports.getOuterHTML = getOuterHTML; -/** - * @category Stringify - * @deprecated Use the `dom-serializer` module directly. - * @param node Node to get the inner HTML of. - * @param options Options for serialization. - * @returns `node`'s inner HTML. - */ -function getInnerHTML(node, options) { - return (0, domhandler_1.hasChildren)(node) - ? node.children.map(function (node) { return getOuterHTML(node, options); }).join("") - : ""; -} -exports.getInnerHTML = getInnerHTML; -/** - * Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags. - * - * @category Stringify - * @deprecated Use `textContent` instead. - * @param node Node to get the inner text of. - * @returns `node`'s inner text. - */ -function getText(node) { - if (Array.isArray(node)) - return node.map(getText).join(""); - if ((0, domhandler_1.isTag)(node)) - return node.name === "br" ? "\n" : getText(node.children); - if ((0, domhandler_1.isCDATA)(node)) - return getText(node.children); - if ((0, domhandler_1.isText)(node)) - return node.data; - return ""; -} -exports.getText = getText; -/** - * Get a node's text content. - * - * @category Stringify - * @param node Node to get the text content of. - * @returns `node`'s text content. - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent} - */ -function textContent(node) { - if (Array.isArray(node)) - return node.map(textContent).join(""); - if ((0, domhandler_1.hasChildren)(node) && !(0, domhandler_1.isComment)(node)) { - return textContent(node.children); - } - if ((0, domhandler_1.isText)(node)) - return node.data; - return ""; -} -exports.textContent = textContent; -/** - * Get a node's inner text. - * - * @category Stringify - * @param node Node to get the inner text of. - * @returns `node`'s inner text. - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText} - */ -function innerText(node) { - if (Array.isArray(node)) - return node.map(innerText).join(""); - if ((0, domhandler_1.hasChildren)(node) && (node.type === domelementtype_1.ElementType.Tag || (0, domhandler_1.isCDATA)(node))) { - return innerText(node.children); - } - if ((0, domhandler_1.isText)(node)) - return node.data; - return ""; -} -exports.innerText = innerText; -//# sourceMappingURL=stringify.js.map
\ No newline at end of file |