@asamuzakjp/nwsapi
Advanced tools
Comparing version 2.2.8 to 2.2.9
{ | ||
"name": "@asamuzakjp/nwsapi", | ||
"version": "2.2.8", | ||
"version": "2.2.9", | ||
"description": "Fast CSS Selectors API Engine", | ||
@@ -5,0 +5,0 @@ "homepage": "http://javascript.nwbox.com/nwsapi/", |
@@ -491,8 +491,7 @@ /** | ||
const nthElement = (function () { | ||
let idx = 0; let len = 0; let set = 0; let parent; const parents = Array(); const nodes = Array(); | ||
let idx = 0; let len = 0; let set = 0; let parent; let parents = []; let nodes = []; | ||
return function (element, dir) { | ||
// ensure caches are emptied after each run, invoking with dir = 2 | ||
if (dir == 2) { | ||
idx = 0; len = 0; set = 0; nodes.length = 0; | ||
parents.length = 0; parent = undefined; | ||
idx = 0; len = 0; set = 0; nodes = []; parents = []; parent = undefined; | ||
return -1; | ||
@@ -512,3 +511,3 @@ } | ||
parents[i = l] = parent; | ||
l = 0; nodes[i] = Array(); | ||
l = 0; nodes[i] = []; | ||
e = parent && parent.firstElementChild || element; | ||
@@ -536,14 +535,15 @@ while (e) { nodes[i][l] = e; if (e === element) j = l; e = e.nextElementSibling; ++l; } | ||
const nthOfType = (function () { | ||
let idx = 0; let len = 0; let set = 0; let parent; const parents = Array(); const nodes = Array(); | ||
let idx = 0; let len = 0; let set = 0; let parent; let parents = []; let nodes = []; | ||
return function (element, dir) { | ||
// ensure caches are emptied after each run, invoking with dir = 2 | ||
if (dir == 2) { | ||
idx = 0; len = 0; set = 0; nodes.length = 0; | ||
parents.length = 0; parent = undefined; | ||
idx = 0; len = 0; set = 0; nodes = []; parents = []; parent = undefined; | ||
return -1; | ||
} | ||
let e; let i; let j; let k; let l; | ||
const name = element.localName; | ||
const prefix = element.prefix; | ||
const nsURI = element.namespaceURI; | ||
if (nsURI !== 'http://www.w3.org/1999/xhtml') { | ||
idx = 0; len = 0; set = 0; nodes = []; parents = []; parent = undefined; | ||
} | ||
let e; let i; let j; let k; let l; | ||
if (nodes[set] && nodes[set][name] && parent === element.parentElement) { | ||
@@ -561,7 +561,7 @@ i = set; j = idx; l = len; | ||
nodes[i] || (nodes[i] = Object()); | ||
l = 0; nodes[i][name] = Array(); | ||
l = 0; nodes[i][name] = []; | ||
e = parent && parent.firstElementChild || element; | ||
while (e) { | ||
if (e === element) j = l; | ||
if (e.localName == name && e.prefix == prefix && e.namespaceURI == nsURI) { | ||
if (e.localName == name && e.namespaceURI == nsURI) { | ||
nodes[i][name][l] = e; | ||
@@ -827,4 +827,4 @@ ++l; | ||
const S_VARS = []; | ||
const M_VARS = []; | ||
let S_VARS = []; | ||
let M_VARS = []; | ||
@@ -874,4 +874,4 @@ // compile groups or single selector strings into | ||
vars = ',' + (S_VARS.join(',') || M_VARS.join(',')); | ||
S_VARS.length = 0; | ||
M_VARS.length = 0; | ||
S_VARS = []; | ||
M_VARS = []; | ||
} | ||
@@ -878,0 +878,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76947