Socket
Socket
Sign inDemoInstall

nwsapi

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nwsapi - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

src/nwsapi.js.FIXED

2

package.json
{
"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 @@ },

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