Skip to content

Commit

Permalink
Update new version 13 January 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzadamodassir committed Jan 13, 2024
1 parent 5ba30e9 commit 6dc8e55
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 1,123 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "snizzle",
"version": "1.4.2",
"version": "1.4.3",
"main": "dist/snizzle.js",
"ignore": [
"node_modules",
Expand Down
4 changes: 2 additions & 2 deletions dist/snizzle-min.js

Large diffs are not rendered by default.

33 changes: 25 additions & 8 deletions dist/snizzle.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/**
* Snizzle is a advance feature-rich CSS Selector Engine v1.4.2
* Snizzle is a advance feature-rich CSS Selector Engine v1.4.3
* https://github.com/jqrony/snizzle
*
* @releases +7 releases
* @version 1.4.2
* @version 1.4.3
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
* @license MIT
* https://github.com/jqrony/snizzle/blob/main/LICENSE
*
* @author Shahzada Modassir <[email protected]>
* Date: 20 December 2023 12:25 GMT+0530 (India Standard Time)
* Date: 13 January 2023 12:25 GMT+0530 (India Standard Time)
*/
(function(window) {
var i, support, unique, Expr, getText, isXML, tokenize, select,
Expand All @@ -21,7 +21,7 @@ var i, support, unique, Expr, getText, isXML, tokenize, select,
expando = "snizzle" + 1 * Date.now(),
preferredDoc = window.document,

version = "1.4.2",
version = "1.4.3",

// Instance methods
hasOwn = ({}).hasOwnProperty,
Expand Down Expand Up @@ -67,7 +67,6 @@ var i, support, unique, Expr, getText, isXML, tokenize, select,

whitespace = "[\\x20\\t\\r\\n\\f]",
identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
wspaceboth = "[#.'\"](" + whitespace + "+)([\\w-]+)(" + whitespace + "+)['\"]*",

attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + "*([*^$|!~]?=)" +
whitespace + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" +
Expand Down Expand Up @@ -766,7 +765,7 @@ Expr=Snizzle.selectors={
}),
"CHILD": specialFunction(function(type, what, _argument) {
var pseudo = ":" + type + "-" + what;
if (support.qsa) {
if (!support.qsa) {
if (_argument) {
pseudo += "(" + _argument + ")";
}
Expand All @@ -776,7 +775,7 @@ Expr=Snizzle.selectors={
return [].indexOf.call(results, elem) > -1;
});
}
return compile(pseudo);
return compile(pseudo, _argument);
}),
"PSEUDO": function(pseudo, arguemnt) {

Expand Down Expand Up @@ -1084,7 +1083,7 @@ function getDefaultAllDocumentElements(results, outermost) {
return seed;
}

compile=Snizzle.compile=function(pseudo) {
compile=Snizzle.compile=function(pseudo, _argument) {
return function(elems) {
if (pseudo===":first-child" || pseudo===":first-of-type") {
return Snizzle.matches(":first", elems);
Expand All @@ -1110,6 +1109,24 @@ compile=Snizzle.compile=function(pseudo) {
})(elems);
return first;
}
if (pseudo===":nth-last-of-type") {
var first = [], results;
access(function(elem) {
results = slice.call(elem.parentNode.children).reverse();
first.push(results[_argument]);
})(elems);
return first;
}
if (pseudo===":nth-child") {
var first = [], results;
access(function(elem) {
results = slice.call(elem.parentNode.children)[_argument - 1];
if (indexOf.call(elems, results) > -1) {
first.push(results);
}
})(elems);
return first;
}
};
};

Expand Down
1 change: 0 additions & 1 deletion dist/snizzle.js.map

This file was deleted.

2 changes: 0 additions & 2 deletions dist/snizzle.min.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/snizzle.min.js.map

This file was deleted.

2 changes: 0 additions & 2 deletions dist/snizzle.min.module.js

This file was deleted.

Loading

0 comments on commit 6dc8e55

Please sign in to comment.