-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: repeat
quantifier
#11
Conversation
c71de78
to
1f876cb
Compare
1f876cb
to
6dd5e9a
Compare
6dd5e9a
to
5af1f2d
Compare
src/quantifiers/repeat.ts
Outdated
config: Repeat['config'] | ||
): string { | ||
if ('count' in config && typeof config?.count === 'number') { | ||
return `${wrapGroup(compiledChildren)}{${config?.count || ''}}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] Why || ''
? You should be able to access config.count
directly inside the if.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks solid! I've left some comments regarding polishing the implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
Summary
This PR implements
repeat()
utility. I still need to figure out how to properly type itTest plan
Passings tests