Skip to content

rest ​

rest simply returns the unparsed input as a string. Never fails.

Usage ​

ts
const Parser = sequence(string('hello'), rest())

Success

ts
run(Parser).with('hello world')

{
  isOk: true,
  start: 0,
  end: 11,
  pos: 11,
  value: ['hello', ' world']
}