@jplorg/jpl
Version:
JPL interpreter
21 lines (20 loc) • 649 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _library = require("../../library");
var _utils = require("./utils");
var _default = exports.default = {
/** { argNames: [string], pipe: [op] } */
op(runtime, input, params, scope, next) {
return next((0, _library.scopedFunction)(params.argNames ?? [], params.pipe ?? [], scope), scope);
},
/** { argNames: [string], pipe: function } */
map(runtime, params) {
return {
argNames: runtime.muxOne([params.argNames], entry => runtime.assertType(entry, 'string')),
pipe: (0, _utils.call)(params.pipe)
};
}
};