Comparing version 1.3.4 to 1.3.5
{ | ||
"name": "nwmatcher", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"description": "A CSS3-compliant JavaScript selector engine.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://javascript.nwbox.com/NWMatcher/", |
@@ -8,5 +8,5 @@ /* | ||
* Author: Diego Perini <diego.perini at gmail com> | ||
* Version: 1.3.4 | ||
* Version: 1.3.5 | ||
* Created: 20070722 | ||
* Release: 20150101 | ||
* Release: 20150710 | ||
* | ||
@@ -51,3 +51,3 @@ * License: | ||
var version = 'nwmatcher-1.3.4', | ||
var version = 'nwmatcher-1.3.5', | ||
@@ -361,9 +361,9 @@ Dom = exports, | ||
return node.attributes[attribute] && | ||
node.attributes[attribute].value || ''; | ||
node.attributes[attribute].value; | ||
} | ||
return ( | ||
attribute == 'type' ? node.getAttribute(attribute) || '' : | ||
ATTR_URIDATA[attribute] ? node.getAttribute(attribute, 2) || '' : | ||
attribute == 'type' ? node.getAttribute(attribute) : | ||
ATTR_URIDATA[attribute] ? node.getAttribute(attribute, 2) : | ||
ATTR_BOOLEAN[attribute] ? node.getAttribute(attribute) ? attribute : 'false' : | ||
((node = node.getAttributeNode(attribute)) && node.value) || ''); | ||
(node = node.getAttributeNode(attribute)) && node.value); | ||
}, | ||
@@ -376,8 +376,5 @@ | ||
function(node, attribute) { | ||
attribute = attribute.toLowerCase(); | ||
if (ATTR_DEFAULT[attribute]) { | ||
return !!node[ATTR_DEFAULT[attribute]]; | ||
} | ||
node = node.getAttributeNode(attribute); | ||
return !!(node && node.specified); | ||
var obj = node.getAttributeNode(attribute = attribute.toLowerCase()); | ||
return ATTR_DEFAULT[attribute] && attribute != 'value' ? | ||
node[ATTR_DEFAULT[attribute]] : obj && obj.specified; | ||
}, | ||
@@ -468,4 +465,6 @@ | ||
} | ||
expr = 'n=s.' + (match[2] ? 'get' : 'has') + 'Attribute(e,"' + match[1] + '")' + (type && match[2] ? '.toLowerCase();' : ';'); | ||
source = expr + 'if(' + (match[2] ? test : 'n') + '){' + source + '}'; | ||
source = 'if(n=s.hasAttribute(e,"' + match[1] + '")){' + | ||
(match[2] ? 'n=s.getAttribute(e,"' + match[1] + '")' : '') + | ||
(type && match[2] ? '.toLowerCase();' : ';') + | ||
'if(' + (match[2] ? test : 'n') + '){' + source + '}}'; | ||
} | ||
@@ -472,0 +471,0 @@ |
@@ -8,5 +8,5 @@ /* | ||
* Author: Diego Perini <diego.perini at gmail com> | ||
* Version: 1.3.4 | ||
* Version: 1.3.5 | ||
* Created: 20070722 | ||
* Release: 20150101 | ||
* Release: 20150710 | ||
* | ||
@@ -51,3 +51,3 @@ * License: | ||
var version = 'nwmatcher-1.3.4', | ||
var version = 'nwmatcher-1.3.5', | ||
@@ -327,9 +327,9 @@ Dom = exports, | ||
return node.attributes[attribute] && | ||
node.attributes[attribute].value || ''; | ||
node.attributes[attribute].value; | ||
} | ||
return ( | ||
attribute == 'type' ? node.getAttribute(attribute) || '' : | ||
ATTR_URIDATA[attribute] ? node.getAttribute(attribute, 2) || '' : | ||
attribute == 'type' ? node.getAttribute(attribute) : | ||
ATTR_URIDATA[attribute] ? node.getAttribute(attribute, 2) : | ||
ATTR_BOOLEAN[attribute] ? node.getAttribute(attribute) ? attribute : 'false' : | ||
((node = node.getAttributeNode(attribute)) && node.value) || ''); | ||
(node = node.getAttributeNode(attribute)) && node.value); | ||
}, | ||
@@ -342,8 +342,5 @@ | ||
function(node, attribute) { | ||
attribute = attribute.toLowerCase(); | ||
if (ATTR_DEFAULT[attribute]) { | ||
return !!node[ATTR_DEFAULT[attribute]]; | ||
} | ||
node = node.getAttributeNode(attribute); | ||
return !!(node && node.specified); | ||
var obj = node.getAttributeNode(attribute = attribute.toLowerCase()); | ||
return ATTR_DEFAULT[attribute] && attribute != 'value' ? | ||
node[ATTR_DEFAULT[attribute]] : obj && obj.specified; | ||
}, | ||
@@ -514,4 +511,6 @@ | ||
} | ||
expr = 'n=s.' + (match[2] ? 'get' : 'has') + 'Attribute(e,"' + match[1] + '")' + (type && match[2] ? '.toLowerCase();' : ';'); | ||
source = expr + 'if(' + (match[2] ? test : 'n') + '){' + source + '}'; | ||
source = 'if(n=s.hasAttribute(e,"' + match[1] + '")){' + | ||
(match[2] ? 'n=s.getAttribute(e,"' + match[1] + '")' : '') + | ||
(type && match[2] ? '.toLowerCase();' : ';') + | ||
'if(' + (match[2] ? test : 'n') + '){' + source + '}}'; | ||
} | ||
@@ -518,0 +517,0 @@ |
@@ -8,5 +8,5 @@ /* | ||
* Author: Diego Perini <diego.perini at gmail com> | ||
* Version: 1.3.4 | ||
* Version: 1.3.5 | ||
* Created: 20070722 | ||
* Release: 20150101 | ||
* Release: 20150710 | ||
* | ||
@@ -55,3 +55,3 @@ * License: | ||
var version = 'nwmatcher-1.3.4', | ||
var version = 'nwmatcher-1.3.5', | ||
@@ -813,3 +813,3 @@ Dom = exports, | ||
function(node, attribute) { | ||
return node.getAttribute(attribute) || ''; | ||
return node.getAttribute(attribute); | ||
} : | ||
@@ -820,12 +820,12 @@ function(node, attribute) { | ||
return node.attributes[attribute] && | ||
node.attributes[attribute].value || ''; | ||
node.attributes[attribute].value; | ||
} | ||
return ( | ||
// 'type' can only be read by using native getAttribute | ||
attribute == 'type' ? node.getAttribute(attribute) || '' : | ||
attribute == 'type' ? node.getAttribute(attribute) : | ||
// specific URI data attributes (parameter 2 to fix IE bug) | ||
ATTR_URIDATA[attribute] ? node.getAttribute(attribute, 2) || '' : | ||
ATTR_URIDATA[attribute] ? node.getAttribute(attribute, 2) : | ||
// boolean attributes should return name instead of true/false | ||
ATTR_BOOLEAN[attribute] ? node.getAttribute(attribute) ? attribute : 'false' : | ||
((node = node.getAttributeNode(attribute)) && node.value) || ''); | ||
(node = node.getAttributeNode(attribute)) && node.value); | ||
}, | ||
@@ -842,9 +842,6 @@ | ||
function(node, attribute) { | ||
attribute = attribute.toLowerCase(); | ||
if (ATTR_DEFAULT[attribute]) { | ||
return !!node[ATTR_DEFAULT[attribute]]; | ||
} | ||
// read the attribute node | ||
node = node.getAttributeNode(attribute); | ||
return !!(node && node.specified); | ||
// read the node attribute object | ||
var obj = node.getAttributeNode(attribute = attribute.toLowerCase()); | ||
return ATTR_DEFAULT[attribute] && attribute != 'value' ? | ||
node[ATTR_DEFAULT[attribute]] : obj && obj.specified; | ||
}, | ||
@@ -1087,8 +1084,7 @@ | ||
// build expression for has/getAttribute | ||
expr = 'n=s.' + (match[2] ? 'get' : 'has') + | ||
'Attribute(e,"' + match[1] + '")' + | ||
(type && match[2] ? '.toLowerCase();' : ';'); | ||
source = 'if(n=s.hasAttribute(e,"' + match[1] + '")){' + | ||
(match[2] ? 'n=s.getAttribute(e,"' + match[1] + '")' : '') + | ||
(type && match[2] ? '.toLowerCase();' : ';') + | ||
'if(' + (match[2] ? test : 'n') + '){' + source + '}}'; | ||
source = expr + 'if(' + (match[2] ? test : 'n') + '){' + source + '}'; | ||
} | ||
@@ -1095,0 +1091,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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
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
7359991
152
19754
1
6
1