-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
I encountered a use case where I would need a parser that could consume a string, but insensitive to the case of the letters it contains.
For example, I would like a parser that matches "foo", "Foo", "fOo", etc.
import { string } from "parjs";
const p = string("foo");
p.parse("foo");
// ParjsSuccess { value: 'foo', kind: 'OK' }
p.parse("Foo");
// ParjsFailure {
// trace: {
// userState: ParserUserState {},
// position: 0,
// reason: "expecting 'foo'",
// input: 'Foo',
// location: [Getter],
// stackTrace: [Array],
// kind: 'Soft'
// }
// }Related:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels