Gathering detailed insights and metrics for wicked-good-xpath
Gathering detailed insights and metrics for wicked-good-xpath
Gathering detailed insights and metrics for wicked-good-xpath
Gathering detailed insights and metrics for wicked-good-xpath
Pure JS implementation of the DOM Level 3 XPath specification
npm install wicked-good-xpath
Typescript
Module System
Node Version
NPM Version
JavaScript (69.86%)
HTML (28.88%)
Python (0.9%)
Shell (0.36%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
284 Stars
50 Commits
67 Forks
25 Watchers
2 Branches
20 Contributors
Updated on Jun 16, 2025
Latest Version
1.3.0
Package Id
wicked-good-xpath@1.3.0
Size
12.30 kB
NPM Version
3.7.3
Node Version
5.9.1
Published on
Apr 01, 2016
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
Wicked Good XPath is a Google-authored pure JavaScript implementation of the DOM Level 3 XPath specification. It enables XPath evaluation for HTML documents in every browser. We believe it to be the fastest XPath implementation available in JavaScript.
Download the latest wgxpath.install.js file and include it on your webpage with a script tag. For example:
1<script src="wgxpath.install.js"></script>
Then call wgxpath.install()
from your JavaScript code, which will ensure document.evaluate
, the XPath evaluation function, is defined on the window object. To install the library on a different window, pass that window as an argument to the install function.
We provide an NPM package at https://www.npmjs.com/package/wicked-good-xpath. There's also another NPM package at https://www.npmjs.com/package/wgxpath.
We use Gulp:
npm install
gulp
You can also run src/compile.sh
if you want to use different versions of
Closure Compiler / Closure Library.
Wicked Good XPath started as a Google Closure port of the JavaScript-XPath project by Cybozu Labs. At the time, JavaScript-XPath was the fastest JavaScript implementation of XPath available --- a whopping 10 times faster than Google's own AJAXSLT --- which made it a popular choice, notable for frontend web testing tools like Selenium and Web Puppeteer.
While it was fast, the code fell out of maintenance (last update was in 2007) so bugs were tough to get fixed. Also, since it wasn't written in Google Closure, it was tricky for us Googlers to integrate into our JavaScript applications. A rewrite was necessary.
However, we went beyond merely porting the library to Google Closure and fixing a couple bugs. We identified some significant additional performance improvements, such that our version runs about 30% faster than the original. On top of that, the Closure compiler was able to minify our code down to a mere 25K, 40% smaller than JavaScript-XPath's 42K (though it has grown a bit since). Finally, the code is structured and documented in a way that we believe will make future maintenance quicker and easier.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
project is archived
Details
Reason
Found 1/29 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More