- satisfy<TToken, TOptions>(test: ((token: TToken, data: Data<TToken, TOptions>, i: number) => boolean)): Parser<TToken, TOptions, TToken>
-
Parameters
-
test: ((token: TToken, data: Data<TToken, TOptions>, i: number) => boolean)
-
- (token: TToken, data: Data<TToken, TOptions>, i: number): boolean
-
Parameters
-
token: TToken
-
data: Data<TToken, TOptions>
-
i: number
Returns boolean
Returns Parser<TToken, TOptions, TToken>
Make a parser that tests a token with a given predicate and returns it.
Use token instead if you want to transform the value.