@jplorg/jpl
Version:
JPL interpreter
31 lines (30 loc) • 740 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _library = require("../../../library");
var _utils = require("../utils");
var _default = exports.default = {
/** { pipe: [op] } */
op(runtime, input, target, params, scope, next) {
return runtime.executeInstructions([{
op: _library.OP_CALCULATION,
params: {
pipe: (0, _utils.constant)(target),
operations: [{
op: _library.OPM_MULTIPLICATION,
params: {
by: params.pipe ?? []
}
}]
}
}], [input], scope, next);
},
/** { pipe: function } */
map(runtime, params) {
return {
pipe: (0, _utils.call)(params.pipe)
};
}
};