RunnableFunction.mjs 411 B

1234567891011121314
  1. export function isRunnableFunctionWithParse(fn) {
  2. return typeof fn.parse === 'function';
  3. }
  4. /**
  5. * This is helper class for passing a `function` and `parse` where the `function`
  6. * argument type matches the `parse` return type.
  7. */
  8. export class ParsingToolFunction {
  9. constructor(input) {
  10. this.type = 'function';
  11. this.function = input;
  12. }
  13. }
  14. //# sourceMappingURL=RunnableFunction.mjs.map