Comparing version 2.0.5 to 2.0.6
{ | ||
"name": "nwsapi", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "Fast CSS Selectors API Engine", | ||
@@ -5,0 +5,0 @@ "homepage": "http://javascript.nwbox.com/nwsapi/", |
@@ -8,5 +8,5 @@ /* | ||
* Author: Diego Perini <diego.perini at gmail com> | ||
* Version: 2.0.5 | ||
* Version: 2.0.6 | ||
* Created: 20070722 | ||
* Release: 20180710 | ||
* Release: 20180718 | ||
* | ||
@@ -34,3 +34,3 @@ * License: | ||
var version = 'nwsapi-2.0.5', | ||
var version = 'nwsapi-2.0.6', | ||
@@ -309,8 +309,8 @@ doc = global.document, | ||
// recursive DOM LTR traversal, configurable by replacing | ||
// iterative DOM LTR traversal, configurable by replacing | ||
// the conditional part (@) that accept returned elements | ||
walk = | ||
'"use strict"; var i = 0, r = Array(); return function treewalk(e) {' + | ||
'if (e.nodeType == 1 && @) { r[i++] = e; } e = e.firstElementChild;' + | ||
'while (e) { treewalk(e); e = e.nextElementSibling; } return r; };', | ||
'"use strict"; return function(c) { var e = c, r = [ ], n = e.firstElementChild; while(e = n) {' + | ||
'if (@) { r[r.length] = e; } if (n = e.firstElementChild || e.nextElementSibling) continue;' + | ||
'while (!n && (e = e.parentElement) && e !== c) { n = e.nextElementSibling; } } return r; }', | ||
@@ -399,7 +399,7 @@ // getElementById from context | ||
// multiple class names | ||
test = 'c.test(e.getAttribute("class"))'; | ||
test = 't.test(e.getAttribute("class"))'; | ||
reCls = RegExp('(^|\\s)' + cls.join('|') + '(\\s|$)', cs); | ||
// build the resolver and execute it | ||
resolver = Function('c', walk.replace('@', test))(reCls || cls[0]); | ||
resolver = Function('t', walk.replace('@', test))(reCls || cls[0]); | ||
return resolver(context); | ||
@@ -406,0 +406,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
194334
8