xpath-analyzer
v3.0.1
Published
An analyzer / parser for XPath 1.0 expressions.
Downloads
135
Readme
xpath-analyzer
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 } }