Skip to content

Conversation

okwasniewski
Copy link
Member

Summary

This PR implements repeat() utility. I still need to figure out how to properly type it

Test plan

Passings tests

@okwasniewski okwasniewski marked this pull request as ready for review December 6, 2023 16:06
@okwasniewski okwasniewski changed the title [WIP] feat: implement repeat feat: implement repeat Dec 6, 2023
@mdjastrzebski mdjastrzebski changed the title feat: implement repeat feat: repeat quantifier Dec 6, 2023
config: Repeat['config']
): string {
if ('count' in config && typeof config?.count === 'number') {
return `${wrapGroup(compiledChildren)}{${config?.count || ''}}`;
Copy link
Member

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.

Copy link
Member

@mdjastrzebski mdjastrzebski left a 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

Copy link
Member

@mdjastrzebski mdjastrzebski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@okwasniewski okwasniewski merged commit eb111c2 into main Dec 6, 2023
@okwasniewski okwasniewski deleted the feat/repeat branch December 6, 2023 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants