New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

linkedom

Package Overview
Dependencies
Maintainers
1
Versions
214
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linkedom - npm Package Compare versions

Comparing version 0.1.18 to 0.1.19

cjs/tree-walker.js

11

cjs/constants.js

@@ -22,1 +22,12 @@ 'use strict';

exports.DOM = DOM;
/**
* TreeWalker related
*/
const SHOW_ALL = -1;
exports.SHOW_ALL = SHOW_ALL;
const SHOW_COMMENT = 128;
exports.SHOW_COMMENT = SHOW_COMMENT;
const SHOW_ELEMENT = 1;
exports.SHOW_ELEMENT = SHOW_ELEMENT;

17

cjs/document.js

@@ -6,5 +6,7 @@ 'use strict';

// mixins & interfaces
const {NonElementParentNode, ParentNode} = require('./mixins.js');
const {Event, CustomEvent} = require('./interfaces.js');
// nodes
const {Attr} = require('./attr.js');

@@ -16,6 +18,11 @@ const {Comment} = require('./comment.js');

const {Text} = require('./text.js');
const {Range} = require('./range.js');
// node extends
const {HTMLElement} = require('./html-element.js');
const {HTMLTemplateElement} = require('./html-template-element.js');
// extras
const {Range} = require('./range.js');
const {TreeWalker} = require('./tree-walker.js');
const {create, defineProperties} = Object;

@@ -187,2 +194,10 @@

/**
* @param {Element} root
* @param {number?} whatToShow
*/
createTreeWalker(root, whatToShow) {
return new TreeWalker(root, whatToShow);
}
createDocumentFragment() {

@@ -189,0 +204,0 @@ return new DocumentFragment(this);

4

cjs/element.js
'use strict';
const {ELEMENT_NODE, ELEMENT_NODE_END, ATTRIBUTE_NODE, TEXT_NODE, COMMENT_NODE} = require('./constants.js');
const {String, ignoreCase, isVoidElement, localCase, parseFromString} = require('./utils.js');
const {String, getNext, ignoreCase, isVoidElement, localCase, parseFromString} = require('./utils.js');

@@ -135,3 +135,3 @@ const {NodeList} = require('./interfaces.js');

get nextSibling() {
return this._end._next;
return getNext(this._end);
}

@@ -138,0 +138,0 @@

@@ -20,3 +20,4 @@ 'use strict';

getBoundaries,
getEnd
getEnd,
getNext
} = require('./utils.js');

@@ -486,3 +487,3 @@

get nextSibling() {
return this._next;
return getNext(this);
}

@@ -489,0 +490,0 @@

@@ -5,2 +5,3 @@ 'use strict';

const {
ELEMENT_NODE_END,
ELEMENT_NODE,

@@ -60,2 +61,9 @@ ATTRIBUTE_NODE

const getNext = ({_next}) => {
while (_next && _next.nodeType === ELEMENT_NODE_END)
_next = _next._next;
return _next;
};
exports.getNext = getNext;
const ignoreCase = ({ownerDocument}) => ownerDocument._mime.ignoreCase;

@@ -62,0 +70,0 @@ exports.ignoreCase = ignoreCase;

@@ -13,1 +13,9 @@ export const ELEMENT_NODE_END = -1;

export const DOM = Symbol('DOM');
/**
* TreeWalker related
*/
export const SHOW_ALL = -1;
export const SHOW_COMMENT = 128;
export const SHOW_ELEMENT = 1;

@@ -5,5 +5,7 @@ import {DOCUMENT_NODE} from './constants.js';

// mixins & interfaces
import {NonElementParentNode, ParentNode} from './mixins.js';
import {Event, CustomEvent} from './interfaces.js';
// nodes
import {Attr} from './attr.js';

@@ -15,6 +17,11 @@ import {Comment} from './comment.js';

import {Text} from './text.js';
import {Range} from './range.js';
// node extends
import {HTMLElement} from './html-element.js';
import {HTMLTemplateElement} from './html-template-element.js';
// extras
import {Range} from './range.js';
import {TreeWalker} from './tree-walker.js';
const {create, defineProperties} = Object;

@@ -186,2 +193,10 @@

/**
* @param {Element} root
* @param {number?} whatToShow
*/
createTreeWalker(root, whatToShow) {
return new TreeWalker(root, whatToShow);
}
createDocumentFragment() {

@@ -188,0 +203,0 @@ return new DocumentFragment(this);

import {ELEMENT_NODE, ELEMENT_NODE_END, ATTRIBUTE_NODE, TEXT_NODE, COMMENT_NODE} from './constants.js';
import {String, ignoreCase, isVoidElement, localCase, parseFromString} from './utils.js';
import {String, getNext, ignoreCase, isVoidElement, localCase, parseFromString} from './utils.js';

@@ -134,3 +134,3 @@ import {NodeList} from './interfaces.js';

get nextSibling() {
return this._end._next;
return getNext(this._end);
}

@@ -137,0 +137,0 @@

@@ -20,2 +20,3 @@ import {

getEnd,
getNext,
// invalidate

@@ -484,3 +485,3 @@ } from './utils.js';

get nextSibling() {
return this._next;
return getNext(this);
}

@@ -487,0 +488,0 @@

import {Parser} from 'htmlparser2';
import {
ELEMENT_NODE_END,
ELEMENT_NODE,

@@ -54,2 +55,8 @@ ATTRIBUTE_NODE

export const getNext = ({_next}) => {
while (_next && _next.nodeType === ELEMENT_NODE_END)
_next = _next._next;
return _next;
};
export const ignoreCase = ({ownerDocument}) => ownerDocument._mime.ignoreCase;

@@ -56,0 +63,0 @@

{
"name": "linkedom",
"version": "0.1.18",
"version": "0.1.19",
"description": "A triple-linked lists based DOM",

@@ -5,0 +5,0 @@ "main": "./cjs/index.js",

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