Creates a Parser that applies the given function to each value generated by the given parser.
Signature:
export declare function map<T, U>(parser: Parser<T>, map: (v: T) => U): Parser<U>;
Parameter | Type | Description |
---|---|---|
parser | Parser<T> | Parser to map over |
map | (v: T) => U | Function to transform values generated by parser |
Returns:
Parser<U>