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

@asamuzakjp/dom-selector

Package Overview
Dependencies
Maintainers
1
Versions
191
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asamuzakjp/dom-selector - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

5

package.json

@@ -22,3 +22,2 @@ {

"@types/css-tree": "^2.3.1",
"@types/node": "^20.1.1",
"css-tree": "^2.3.1"

@@ -31,3 +30,3 @@ },

"eslint-config-standard": "^17.0.0",
"eslint-plugin-jsdoc": "^44.1.0",
"eslint-plugin-jsdoc": "^44.2.0",
"eslint-plugin-regexp": "^1.15.0",

@@ -46,3 +45,3 @@ "eslint-plugin-unicorn": "^47.0.0",

},
"version": "0.4.1"
"version": "0.4.2"
}

44

src/js/matcher.js

@@ -52,10 +52,12 @@ /**

}
let i = 0;
while (i < l && nth < l) {
if (i === nth) {
const item = arr[i];
res.add(item);
nth += a;
if (nth >= 0) {
let i = 0;
while (i < l && nth < l) {
if (i === nth) {
const item = arr[i];
res.add(item);
nth += a;
}
i++;
}
i++;
}

@@ -113,15 +115,17 @@ }

}
let i = 0;
let j = 0;
while (i < l && nth < l) {
const item = arr[i];
const { localName: itemLocalName, prefix: itemPrefix } = item;
if (itemLocalName === localName && itemPrefix === prefix) {
if (j === nth) {
res.add(item);
nth += a;
if (nth >= 0) {
let i = 0;
let j = 0;
while (i < l && nth < l) {
const item = arr[i];
const { localName: itemLocalName, prefix: itemPrefix } = item;
if (itemLocalName === localName && itemPrefix === prefix) {
if (j === nth) {
res.add(item);
nth += a;
}
j++;
}
j++;
i++;
}
i++;
}

@@ -166,5 +170,3 @@ }

(astPrefix === '*' && astNodeName === nodeName) ||
(astPrefix === '' && !nodePrefix &&
(astNodeName === '*' || astNodeName === nodeName)) ||
(astPrefix === nodePrefix &&
((astPrefix === nodePrefix || (astPrefix === '' && !nodePrefix)) &&
(astNodeName === '*' || astNodeName === nodeName))) {

@@ -171,0 +173,0 @@ res = node;

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