Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

domutils

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

domutils - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

1

lib/helpers.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.uniqueSort = exports.compareDocumentPosition = exports.removeSubsets = void 0;
var tagtypes_1 = require("./tagtypes");

@@ -4,0 +5,0 @@ /**

27

lib/index.js
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./stringify"));
__export(require("./traversal"));
__export(require("./manipulation"));
__export(require("./querying"));
__export(require("./legacy"));
__export(require("./helpers"));
__export(require("./tagtypes"));
__exportStar(require("./stringify"), exports);
__exportStar(require("./traversal"), exports);
__exportStar(require("./manipulation"), exports);
__exportStar(require("./querying"), exports);
__exportStar(require("./legacy"), exports);
__exportStar(require("./helpers"), exports);
__exportStar(require("./tagtypes"), exports);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getElementsByTagType = exports.getElementsByTagName = exports.getElementById = exports.getElements = exports.testElement = void 0;
var querying_1 = require("./querying");

@@ -4,0 +5,0 @@ var tagtypes_1 = require("./tagtypes");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.prepend = exports.append = exports.appendChild = exports.replaceElement = exports.removeElement = void 0;
/***

@@ -48,2 +49,3 @@ * Remove an element from the dom

function appendChild(elem, child) {
removeElement(child);
child.parent = elem;

@@ -65,2 +67,3 @@ if (elem.children.push(child) !== 1) {

function append(elem, next) {
removeElement(next);
var parent = elem.parent;

@@ -67,0 +70,0 @@ var currNext = elem.next;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.findAll = exports.existsOne = exports.findOne = exports.findOneChild = exports.find = exports.filter = void 0;
var tagtypes_1 = require("./tagtypes");

@@ -4,0 +5,0 @@ /**

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getText = exports.getInnerHTML = exports.getOuterHTML = void 0;
var tagtypes_1 = require("./tagtypes");

@@ -8,0 +9,0 @@ var dom_serializer_1 = __importDefault(require("dom-serializer"));

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasChildren = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = void 0;
var domelementtype_1 = require("domelementtype");

@@ -4,0 +5,0 @@ function isTag(node) {

@@ -13,2 +13,3 @@ import { Node, Element } from "domhandler";

export declare function getName(elem: Element): string;
export declare function nextElementSibling(elem: Node): Node | null;
//# sourceMappingURL=traversal.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.nextElementSibling = exports.getName = exports.hasAttrib = exports.getAttributeValue = exports.getSiblings = exports.getParent = exports.getChildren = void 0;
function getChildren(elem) {

@@ -36,1 +37,8 @@ return elem.children || null;

exports.getName = getName;
function nextElementSibling(elem) {
var node = elem.next;
while (node !== null && node.type !== "tag")
node = node.next;
return node;
}
exports.nextElementSibling = nextElementSibling;
{
"name": "domutils",
"version": "2.1.0",
"version": "2.2.0",
"description": "Utilities for working with htmlparser2's dom",
"sideEffects": false,
"main": "lib/index.js",

@@ -28,3 +29,3 @@ "types": "lib/index.d.ts",

"dependencies": {
"dom-serializer": "^0.2.1",
"dom-serializer": "^1.0.1",
"domelementtype": "^2.0.1",

@@ -34,4 +35,4 @@ "domhandler": "^3.0.0"

"devDependencies": {
"@types/jest": "^25.1.4",
"@types/node": "^13.9.1",
"@types/jest": "^26.0.0",
"@types/node": "^14.0.5",
"@typescript-eslint/eslint-plugin": "^2.31.0",

@@ -45,3 +46,3 @@ "@typescript-eslint/parser": "^2.31.0",

"prettier": "^2.0.5",
"ts-jest": "^25.3.1",
"ts-jest": "^26.0.0",
"typedoc": "^0.17.1",

@@ -48,0 +49,0 @@ "typedoc-plugin-markdown": "^2.2.16",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc