UNPKG

@abaplint/runtime

Version:
18 lines 702 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.bitor = bitor; /*eslint no-bitwise: ["error", { "allow": ["|"] }] */ const types_1 = require("../types"); const _bit_operations_1 = require("./_bit_operations"); function bitor(left, right) { let or = ""; const chunks = (0, _bit_operations_1.get_bit_operation_chunks)(left, right); // eslint-disable-next-line no-cond-assign for (let i = 0, chunk; chunk = chunks[i]; i++) { or = or + (chunk.leftChunk | chunk.rightChunk).toString(16).toUpperCase().padStart(chunk.chunkLen, "0"); } const ret = new types_1.XString(); ret.set(or); return ret; } //# sourceMappingURL=bit-or.js.map