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.3 to 2.0.4

2

package.json
{
"name": "nwsapi",
"version": "2.0.3",
"version": "2.0.4",
"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.3
* Version: 2.0.4
* Created: 20070722
* Release: 20180608
* Release: 20180618
*

@@ -34,3 +34,3 @@ * License:

var version = 'nwsapi-2.0.3',
var version = 'nwsapi-2.0.4',

@@ -320,10 +320,19 @@ doc = global.document,

function(ids, context) {
var element, resolver, test, reIds;
var e, elements, resolver, test, reIds, api = method['#'];
if (typeof ids == 'string') { ids = [ ids ]; }
// if duplicates are disallowed use DOM API to collect the nodes
if (!Config.IDS_DUPES && ids.length < 2 && method['#'] in context) {
element = context.getElementById(ids[0]);
return element ? [ element ] : none;
if (!Config.IDS_DUPES && ids.length < 2 && context[api]) {
return (e = context[api](ids[0])) ? [ e ] : none;
} else if (Config.IDS_DUPES && ids.length < 2) {
if ('all' in context) {
if ((e = context.all[ids[0]])) {
// bugfixing
if (e.nodeType == 1) return e.getAttribute('id') != ids[0] ? [ ] : [ e ];
for (i = 0, l = e.length, elements = [ ]; l > i; ++i) {
if (e[i].id == ids[0]) elements[elements.length] = e[i];
}
return elements && elements.length ? elements : [ elements ];
} else return none;
}
}

@@ -961,3 +970,3 @@

expr = match[3].replace(REX.TrimSpaces, '');
source = 'if(s.match("' + expr.replace(/\x22/g, '\\"') + ',e")){' + source + '}';
source = 'if(s.match("' + expr.replace(/\x22/g, '\\"') + '",e,f)){' + source + '}';
break;

@@ -964,0 +973,0 @@ case 'not':

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