Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@asamuzakjp/nwsapi

Package Overview
Dependencies
Maintainers
0
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asamuzakjp/nwsapi - npm Package Compare versions

Comparing version 2.2.13 to 2.2.14

2

package.json
{
"name": "@asamuzakjp/nwsapi",
"version": "2.2.13",
"version": "2.2.14",
"description": "Fast CSS Selectors API Engine",

@@ -5,0 +5,0 @@ "homepage": "http://javascript.nwbox.com/nwsapi/",

@@ -14,2 +14,3 @@ /**

* - Add ::slotted() to pseudo-elements list
* - Optimize some regular expressions
*/

@@ -43,8 +44,6 @@ /*

const WSP = '[\\x20\\t\\r\\n\\f]';
const CFG = {
// extensions
operators: '[~*^$|]=|=',
combinators: '[\\x20\\t>+~](?=[^>+~])'
combinators: '[\\s>+~](?=[^>+~])'
};

@@ -66,9 +65,9 @@

regExpChar: /(?:(?!\\)[\\^$.*+?()[\]{}|/])/g,
trimSpaces: RegExp('[\\r\\n\\f]|^' + WSP + '+|' + WSP + '+$', 'g'),
commaGroup: RegExp('(\\s*,\\s*)' + NOT.squareEnc + NOT.parensEnc, 'g'),
splitGroup: /((?:\x28[^\x29]*\x29|\[[^\]]*\]|\\.|[^,])+)/g,
fixEscapes: RegExp('\\\\([0-9a-f]{1,6}' + WSP + '?|.)|([\\x22\\x27])', 'gi'),
combineWSP: RegExp('[\\n\\r\\f\\x20]+' + NOT.singleEnc + NOT.doubleEnc, 'g'),
tabCharWSP: RegExp('(\\x20?\\t+\\x20?)' + NOT.singleEnc + NOT.doubleEnc, 'g'),
pseudosWSP: RegExp('\\s+([-+])\\s+' + NOT.squareEnc, 'g')
trimSpaces: /[\r\n\f]|^\s+|\s+$/g,
commaGroup: RegExp('(\\s{0,255},\\s{0,255})' + NOT.squareEnc + NOT.parensEnc, 'g'),
splitGroup: /((?:\x28[^\x29]{0,255}\x29|\[[^\]]{0,255}\]|\\.|[^,])+)/g,
fixEscapes: /\\([0-9a-f]{1,6}\s?|.)|([\x22\x27])/gi,
combineWSP: RegExp('\\s{1,255}' + NOT.singleEnc + NOT.doubleEnc, 'g'),
tabCharWSP: RegExp('(\\s?\\t{1,255}\\s?)' + NOT.singleEnc + NOT.doubleEnc, 'g'),
pseudosWSP: RegExp('\\s{1,255}([-+])\\s{1,255}' + NOT.squareEnc, 'g')
};

@@ -109,6 +108,6 @@

// combinator symbols
children: RegExp('^' + WSP + '?>' + WSP + '?(.*)'),
adjacent: RegExp('^' + WSP + '?\\+' + WSP + '?(.*)'),
relative: RegExp('^' + WSP + '?~' + WSP + '?(.*)'),
ancestor: RegExp('^' + WSP + '+(.*)'),
children: /^\s?>\s?(.*)/,
adjacent: /^\s?\+\s?(.*)/,
relative: /^\s?~\s?(.*)/,
ancestor: /^\s+(.*)/,
// universal & namespace

@@ -694,3 +693,3 @@ universal: /^\*(.*)/,

const nonascii = '[^\\x00-\\x9f]';
const esctoken = '\\\\(?:[^\\r\\n\\f\\da-f]|[\\da-f]{1,6}\\s*)';
const esctoken = '\\\\(?:[^\\r\\n\\f\\da-f]|[\\da-f]{1,6}\\s{0,255})';
const identifier =

@@ -712,12 +711,6 @@ '(?:--|-?(?:[a-z_]|' + nonascii + '|' + esctoken + '))' +

// attribute presence
'(?:\\*\\|)?' +
WSP + '?' +
'(' + identifier + '(?::' + identifier + ')?)' +
WSP + '?' +
'(?:' +
'(' + CFG.operators + ')' + WSP + '?' +
'(?:' + attrparser + ')' +
')?' +
'(?:\\*\\|)?\\s?(' + identifier + '(?::' + identifier + ')?)\\s?' +
'(?:(' + CFG.operators + ')\\s?(?:' + attrparser + '))?' +
// attribute case sensitivity
'(?:' + WSP + '?\\b(i))?' + WSP + '?' +
'(?:\\s?\\b(i))?\\s?' +
'(?:\\]|$)';

@@ -728,3 +721,3 @@

const pseudoclass =
'(?:\\x28' + WSP + '*' +
'(?:\\x28\\s*' +
'(?:' + pseudoparms + '?)?|' +

@@ -739,9 +732,10 @@ // universal * &

')+|' +
'(?:' + WSP + '?[>+~]' + WSP + '?)|' +
'(?:' + WSP + '?,' + WSP + '?)|' +
'(?:' + WSP + '?)|' +
'\\x29|$)*';
'\\s?[>+~]\\s?|' +
'\\s?,\\s?|' +
'\\s|' +
'\\x29|$' +
')*';
const standardValidator =
'(?=' + WSP + '?[^>+~(){}<])' +
'(?=\\s?[^>+~(){}<])' +
'(?:' +

@@ -754,5 +748,5 @@ // universal * &

'(?:::?' + pseudonames + pseudoclass + ')|' +
'(?:' + WSP + '?' + CFG.combinators + WSP + '?)|' +
'(?:' + WSP + '?,' + WSP + '?)|' +
'(?:' + WSP + '?)' +
'(?:\\s?' + CFG.combinators + '\\s?)|' +
'\\s?,\\s?|' +
'\\s?' +
')+';

@@ -765,9 +759,5 @@

reOptimizer = RegExp(
'(?:([.:#*]?)' +
'(' + identifier + ')' +
'(?:' +
':[-\\w]+|' +
'\\[[^\\]]+(?:\\]|$)|' +
'\\x28[^\\x29]+(?:\\x29|$)' +
')*)$', 'i');
'(?:([.:#*]?)(' + identifier + ')' +
'(?::[-\\w]+|\\[[^\\]]+(?:\\]|$)|\\x28[^\\x29]+(?:\\x29|$))*' +
')$', 'i');

@@ -774,0 +764,0 @@ // global

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