UNPKG

xpath-ts2

Version:

DOM 3 and 4 XPath 1.0 implementation for browser and Node.js environment with support for typescript 5.

13 lines (10 loc) 359 B
import { XPathContext } from '../xpath-types'; import { BinaryOperation } from './binary-operation'; export class GreaterThanOperation extends BinaryOperation { evaluate(c: XPathContext) { return this.lhs.evaluate(c).greaterthan(this.rhs.evaluate(c)); } toString() { return '(' + this.lhs.toString() + ' > ' + this.rhs.toString() + ')'; } }