New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nut

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nut - npm Package Compare versions

Comparing version 0.1.11 to 0.1.13

76

ender.js
// inspired from https://github.com/ded/qwery/blob/master/src/ender.js
(function(){
var nut=require('nut');
$._select=function(selectors,contexts){
// Nodes
if(typeof selectors!='string'){
return selectors;
$._select=function(selectors,contexts){
// Nodes
if(typeof selectors!='string'){
return selectors;
}
// New element
else if(selectors.match(/^\s*</)){
var tag=selectors.match(/^\s*<\s*([a-z]+)/i)[1],
table='table',
nodeMap={
thead: table,
tbody: table,
tfoot: table,
tr: 'tbody',
th: 'tr',
td: 'tr',
fieldset: 'form',
option: 'select'
},
root=document.createElement(nodeMap[tag] || 'div'),
element,
elements=[],
i=-1;
root.innerHTML=selectors;
element=root.firstChild;
do{
element.nodeType==1 && elements.push(element);
}
// New element
else if(selectors.match(/^\s*</)){
var tag=selectors.match(/^\s*<\s*([a-z]+)/i)[1],
table='table',
nodeMap={
thead: table,
tbody: table,
tfoot: table,
tr: 'tbody',
th: 'tr',
td: 'tr',
fieldset: 'form',
option: 'select'
},
root=document.createElement(nodeMap[tag] || 'div'),
element,
elements=[],
i=-1;
root.innerHTML=selectors;
element=root.firstChild;
do{
element.nodeType==1 && elements.push(element);
}
while(element=element.nextSibling)
return elements;
}
// Selectors
else{
return nut(selectors,contexts);
}
};
}());
while(element=element.nextSibling)
return elements;
}
// Selectors
else{
return require('nut')(selectors,contexts);
}
};
/*
nut, the concise CSS selector engine
Version : 0.1.11
Version : 0.1.13
Author : Aurélien Delogu (dev@dreamysource.fr)

@@ -6,0 +6,0 @@ Homepage : https://github.com/pyrsmk/nut

{
"name" : "nut",
"description" : "The concise CSS selector engine",
"version" : "0.1.11",
"version" : "0.1.13",
"author" : "Aurélien Delogu <pyrsmk@dreamysource.fr> (http://dreamysource.fr)",

@@ -6,0 +6,0 @@ "repository" : {

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