UNPKG

xpath-ts2

Version:

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

18 lines 587 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AndOperation = void 0; const binary_operation_1 = require("./binary-operation"); class AndOperation extends binary_operation_1.BinaryOperation { evaluate(c) { const b = this.lhs.evaluate(c).bool; if (!b.booleanValue) { return b; } return this.rhs.evaluate(c).bool; } toString() { return '(' + this.lhs.toString() + ' and ' + this.rhs.toString() + ')'; } } exports.AndOperation = AndOperation; //# sourceMappingURL=and-operation.js.map