Optional
max: number2 parameters for min/max
repeat(3,5)`foo`
repeat(3,5).exactly`foo`
repeat(3,5)('foo')
RegExp equivalent:
/(?:foo){3,5}/
1 parameter for exact number
repeat(3)`foo`
repeat(3).exactly`foo`
repeat(3)('foo')
RegExp equivalent:
/(?:foo){3}/
Lazy matching
repeatLazily(3,5)`foo`
repeat.lazily(3,5)`foo`
RegExp equivalent:
/(?:foo){3,5}?/
Generated using TypeDoc
Match a token the specified amount of times. Supply 1 parameter for an exact number of times, or 2 parameters for min/max.