Skip to content

Commit

Permalink
update v1.5.0 on 18 January 2025
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzadamodassir committed Jan 18, 2024
1 parent 7d7820a commit 0a7622c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 32 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- [Deployed source](https://jqrony.github.io/snizzle/dist/snizzle-min.js)

## New Features
Snizzle `v1.4.2` in new features included for related advance DOM-Element Selecting Snizzle library in added new features `XPath selenium` now user can be select DOM elements XPath through.
Snizzle `v1.5.0` in new features included for related advance DOM-Element Selecting Snizzle library in added new features `XPath selenium` now user can be select DOM elements XPath through.

**Example**
```js
Expand All @@ -39,7 +39,7 @@ Snizzle("/html/body/main/div/div[2]/section/nav/ul/li[3]");
```

## Contribution Guides
In order to build Snizzle, you should have Node.js/npm latest and git 1.4.2 or later (earlier versions might work OK, but are not tested).
In order to build Snizzle, you should have Node.js/npm latest and git 1.5.0 or later (earlier versions might work OK, but are not tested).

For Windows you have to download and install git and [Node.js](https://nodejs.org/download/).

Expand All @@ -62,7 +62,7 @@ As an alternative you can use the Yarn CLI command:
### Snizzle information
For information on how to get started and how to use Snizzle, please see [Snizzle's](https://github.com/jqrony/snizzle) [documentation](https://github.com/jqrony/snizzle/wiki). For source files and issues, please visit the Snizzle repository.

If upgrading, please see the blog post for [release 1.4.2](https://github.com/jqrony/snizzle/releases/tag/1.4.2). This includes notable differences from the previous version and a more readable changelog.
If upgrading, please see the blog post for [release 1.5.0](https://github.com/jqrony/snizzle/releases/tag/1.5.0). This includes notable differences from the previous version and a more readable changelog.

## Including Snizzle
Below are some of the most common ways to include Snizzle
Expand Down
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.3",
"version": "1.5.0",
"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.

29 changes: 4 additions & 25 deletions dist/snizzle.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Snizzle is a advance feature-rich CSS Selector Engine v1.4.3
* Snizzle is a advance feature-rich CSS Selector Engine v1.5.0
* https://github.com/jqrony/snizzle
*
* @releases +7 releases
* @version 1.4.3
* @version 1.5.0
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
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.3",
version = "1.5.0",

// Instance methods
hasOwn = ({}).hasOwnProperty,
Expand All @@ -41,29 +41,11 @@ var i, support, unique, Expr, getText, isXML, tokenize, select,

// Local document vars
setDocument, document, docElem, documentIsHTML,

// Regular expressions sources
// HTML Singleton TAGS with no closing TAG
nctags = "img|input|meta|area|keygen|base|link|br|hr|command|col|param|track|wbr|embed|" +
"source",

nstags = "svg|g|defs|desc|symbol|use|image|switch|set|circle|ellipse|line|polyline|" +
"animatetransform|mpath|foreignobject|linegradient|radialgradient|stop|pattern|" +
"polygon|path|text|tspan|textpath|tref|marker|view|rect|animatemotion|font|" +
"clippath|mask|filter|cursor|hkern|vkern|(?:font-(face)(?:.*|src|uri|format|name))",

booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" +
"ismap|loop|multiple|open|readonly|required|scoped|muted",

themes = "theme-color|apple-mobile-web-app-status-bar-style|msapplication-TileColor|" +
"msapplication-navbutton-color",

nsattributes = "clip|color|cursor|direction|display|fill|filter|font|kerning|marker|" +
"mask|stroke|zoomandpan|xml:(?:lang|space|base)|clip-(?:path|rule)|lighting-color|" +
"points|d|viewbox|enable-background|fill-(?:opacity|rule)|flood-(?:color|opacity)|" +
"glyph-orientation-(?:horizontal|vertical)|image-rendering|stop-(?:color|opacity)|" +
"dominant-baseline|x1|x2|y1|y2|cx|cy|r|ry|" +
"stroke-(?:dasharray|dashoffset|linecap|linejoin|miterlimit|opacity|width)|text-rendering",

whitespace = "[\\x20\\t\\r\\n\\f]",
identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
Expand Down Expand Up @@ -109,15 +91,12 @@ var i, support, unique, Expr, getText, isXML, tokenize, select,
rcombinators = new RegExp("^" + whitespace+ "*([>+~=<]|" +whitespace+ ")" + whitespace + "*"),
rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"),
matchExpr = {
"inlineTag": new RegExp("^(?:" + nctags + ")$", "i"),
"bool": new RegExp("^(?:" + booleans + ")$", "i"),
"ID": new RegExp("^#(" + identifier + ")"),
"CLASS": new RegExp("^\\.(" + identifier + ")"),
"TAG": new RegExp("^(" + identifier + "|[*])"),
"ATTR": new RegExp("^" + attributes),
"PSEUDO": new RegExp("^" + pseudos),
"nstag": new RegExp("^(?:" + nstags + ")$", "i"),
"nsattr": new RegExp("^(?:" + nsattributes + ")$"),
"CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"),
Expand Down Expand Up @@ -1052,7 +1031,7 @@ access(function(attr) {
Expr.attrHandle[attr]=access(function(elem) {
return attrFilter(elem, attr, "hasAttribute");
});
})(booleans.concat("|" + nsattributes).match(/\w+/g));
})(booleans.match(/\w+/g));

/**
* setFilters
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Snizzle",
"name": "snizzle",
"version": "1.4.3",
"version": "1.5.0",
"description": "A pure-JavaScript fast, CSS selector engine program to be easily select DOM-Elements",
"types": "dist/snizzle.js",
"main": "dist/snizzle.js",
Expand Down

0 comments on commit 0a7622c

Please sign in to comment.