
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
This is a modified version of js-xpath. It is adapted for use with TypeScript and is compiled using npm run build.
npm install ts-xpath
import { XPathParser } from 'ts-xpath';
let parser = new XPathParser();
let parsed = parser.parse("//node");
xpath-models.ts provides a default XPathModels which does not support the hashtag preprocessor. If you want to support hashtags within xpaths, you can use:
let hashtagConfig: XPathModels.HashtagConfig = {
isValidNamespace: (namespace: string) => boolean,
hashtagToXPath: (hashtagExpr: string) => string | null,
toHashtag: (xpath: IXPathExpression) => string | null
}
parser.hashtagConfig = hashtagConfig;
hashtags use the format #namespace/arbitrarily/long/path and do not support filtering
yarn test to run tests.This is built using a fork of jison. To build the parser file yourself run:
$ yarn build - This will build both the distribution (webpack) package in dist/ and rebuild the Jison parser (src/jison/xpath.js) from the src/jison/ files.
$ yarn jison - Rebuild parser.js from the Jison specification files.
For more information on jison see the jison project website at: http://zaach.github.com/jison/.
FAQs
XPath Parser for TypeScript
The npm package ts-xpath receives a total of 22 weekly downloads. As such, ts-xpath popularity was classified as not popular.
We found that ts-xpath demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.