Skip to content

badeball/xpath-analyzer

Repository files navigation

xpath-analyzer

Build Status Code Climate Test Coverage

An analyzer / parser for XPath 1.0 expressions.

Installation

The package can be installed with npm.

$ npm install xpath-analyzer

Usage (ES modules)

import XPathAnalyzer from "xpath-analyzer";

let analyzer = new XPathAnalyzer("1 + 1");

analyzer.parse();

// { type: 'additive',
//   lhs: { type: 'number', number: 1 },
//   rhs: { type: 'number', number: 1 } }

Usage (CommonJS)

var XPathAnalyzer = require("xpath-analyzer").default;

var analyzer = new XPathAnalyzer("1 + 1");

analyzer.parse();

// { type: 'additive',
//   lhs: { type: 'number', number: 1 },
//   rhs: { type: 'number', number: 1 } }

About

An analyzer / parser for XPath 1.0 expressions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published