import type { Parser , ScopeTransform } from "../api.js" ; import { xform } from "../combinators/xform.js" ; /**
 * Uses `String.trim()` to remove leading and trailing white space and
 * linebreak chars from node result.
 *
 *  trim .
 *
 *  param scope export const xfTrim = ( scope ) => { scope ! . result = ( < string > scope ! . result ) . trim ( ) ; return scope ; } ; param parser export const trim = ( parser ) => xform ( parser , xfTrim ) ;