UNPKG

@jplorg/jpl

Version:
35 lines (33 loc) 750 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.call = call; exports.constant = constant; var _library = require("../../library"); /** Create OP_CONSTANT operation for the specified normalized value */ function constant(value) { return [{ op: _library.OP_CONSTANT, params: { value: value ?? null } }]; } /** Create OPA_FUNCTION operation for the specified function */ function call(value) { return [{ op: _library.OP_ACCESS, params: { pipe: constant((0, _library.assertType)(value, 'function')), selectors: [{ op: _library.OPA_FUNCTION, params: { args: [], bound: false, optional: false } }] } }]; }