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.2 to 2.0.3

2

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

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

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

@@ -94,7 +94,3 @@ doc = global.document,

MIXEDCASE: true,
SVG_LCASE: true,
SIMPLENOT: true,
USE_HTML5: true,

@@ -105,3 +101,2 @@ LOGERRORS: true,

MIXEDCASE,
NAMESPACE,

@@ -177,3 +172,2 @@ QUIRKS_MODE,

HTML_DOCUMENT = isHTML(doc);
MIXEDCASE = Config.MIXEDCASE;
QUIRKS_MODE = HTML_DOCUMENT &&

@@ -407,26 +401,2 @@ doc.compatMode.indexOf('CSS') < 0;

// namespace aware hasAttribute
// helper for XML/XHTML documents
hasAttributeNS =
function(e, name) {
var i, l, attr = e.getAttributeNames();
name = RegExp(':?' + name + '$', 'i');
for (i = 0, l = attr.length; l > i; ++i) {
if (name.test(attr[i])) return true;
}
return false;
},
// namespace aware getAttribute
// helper for XML/XHTML documents
getAttributeNS =
function(e, name) {
var i, l, attr = e.getAttributeNames();
name = RegExp(':?' + name + '$', 'i');
for (i = 0, l = attr.length; l > i; ++i) {
if (name.test(attr[i])) return e.getAttribute(attr[i]);
}
return null;
},
// fast resolver for the :nth-child() and :nth-last-child() pseudo-classes

@@ -542,4 +512,2 @@ nthElement = (function() {

domapi = set_domapi();
} else if (i == 'SVG_LCASE') {
Config.MIXEDCASE = Config[i];
}

@@ -811,3 +779,4 @@ }

match = selector.match(Patterns.className);
source = 'if(' + N + '(/(^|\\s)' + match[1] + '(\\s|$)/.test(e.getAttribute("class"))' +
compat = (QUIRKS_MODE ? 'i' : '') + '.test(e.getAttribute("class"))';
source = 'if(' + N + '(/(^|\\s)' + match[1] + '(\\s|$)/' + compat +
')){' + source + '}';

@@ -818,7 +787,3 @@ break;

match = selector.match(Patterns.tagName);
compat = HTML_DOCUMENT ? match[1].toUpperCase() : match[1];
source = 'if(' + N + '(' +
(!HTML_DOCUMENT || MIXEDCASE || lastContext.nodeType == 11 ?
'/^' + match[1] + '$/i.test(e.nodeName)' :
'e.nodeName=="' + compat + '"') +
source = 'if(' + N + '(e.nodeName.toLowerCase()=="' + match[1].toLowerCase() + '"' +
')){' + source + '}';

@@ -843,3 +808,3 @@ break;

match = selector.match(Patterns.attribute);
NS = !MIXEDCASE && match[0].match(/(\*|\w+)\|[-\w]+/);
NS = match[0].match(/(\*|\w+)\|[-\w]+/);
name = match[1];

@@ -865,4 +830,3 @@ expr = name.split(':');

type = HTML_DOCUMENT && HTML_TABLE[expr.toLowerCase()] ? 'i' : '';
source = 'if(' + N + '(' + (!match[2] ?
(MIXEDCASE && NS ? 's.hasAttributeNS(e,"' + name + '")' : 'e.hasAttribute("' + name + '")') :
source = 'if(' + N + '(' + (!match[2] ? 'e.hasAttribute("' + name + '")' :
!match[4] && ATTR_STD_OPS[match[2]] && match[2] != '~=' ? 'e.getAttribute("' + name + '")==""' :

@@ -1430,6 +1394,6 @@ '(/' + test.p1 + match[4] + test.p2 + '/' + type + ').test(e.getAttribute("' + name + '"))==' + test.p3) +

symbol = token[1] || '*';
if (symbol == '#') { ++ni; id += i === 0 ? ident : ',' + ident; }
if (symbol == '.') { ++nc; cn += i === 0 ? ident : ',' + ident; }
if (symbol == '*') { ++nt; tn += i === 0 ? ident : ',' + ident; }
}
if (symbol == '#') { ++ni; id += i === 0 ? ident : ',' + ident; }
if (symbol == '.') { ++nc; cn += i === 0 ? ident : ',' + ident; }
if (symbol == '*') { ++nt; tn += i === 0 ? ident : ',' + ident; }
}

@@ -1567,6 +1531,3 @@ if (ni == l) {

nthOfType: nthOfType,
nthElement: nthElement,
hasAttributeNS: hasAttributeNS,
getAttributeNS: getAttributeNS
nthElement: nthElement
},

@@ -1603,5 +1564,2 @@

hasAttributeNS: hasAttributeNS,
getAttributeNS: getAttributeNS,
match: match,

@@ -1608,0 +1566,0 @@ first: first,

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