UNPKG

@thi.ng/parse

Version:

Purely functional parser combinators & AST generation for generic inputs

11 lines (10 loc) 211 B
import { xform } from "../combinators/xform.js"; const xfTrim = (scope) => { scope.result = scope.result.trim(); return scope; }; const trim = (parser) => xform(parser, xfTrim); export { trim, xfTrim };