@jplorg/jpl
Version:
JPL interpreter
19 lines (18 loc) • 555 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _utils = require("./utils");
var _default = exports.default = {
/** { pipes: [[op]] } */
op(runtime, input, params, scope, next) {
return runtime.muxAll([params.pipes ?? []], pipe => runtime.executeInstructions(pipe ?? [], [input], scope, output => next(output, scope)));
},
/** { pipes: [function] } */
map(runtime, params) {
return {
pipes: runtime.muxOne([params.pipes], value => (0, _utils.call)(value))
};
}
};