UNPKG

@jplorg/jpl

Version:
21 lines (20 loc) 636 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _library = require("../library"); function builtin(runtime, signal, next, input, arg0) { const value = runtime.unwrapValue(input); const t = runtime.type(value); const token = runtime.unwrapValue(arg0 ?? null); const tt = runtime.type(token); switch (t) { case 'string': if (tt === 'string') return next(value.startsWith(token)); break; default: } throw new _library.JPLTypeError('%s (%*<100v) cannot start with %s (%*<100v)', t, value, tt, token); } var _default = exports.default = builtin;