UNPKG

@jsonjoy.com/codegen

Version:

No-dependencies, low-level, high-performance JIT code generation package for JavaScript

11 lines 453 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.emitStringMatch = void 0; const emitStringMatch = (expression, offset, match) => { const conditions = []; for (let i = 0; i < match.length; i++) conditions.push(`${match.charCodeAt(i)} === ${expression}.charCodeAt(${offset} + ${i})`); return conditions.join(' && '); }; exports.emitStringMatch = emitStringMatch; //# sourceMappingURL=helpers.js.map