Skip to content

refactor(lib/validation): remove redundant regex quantifier#5751

Merged
Fdawgs merged 1 commit into
mainfrom
Fdawgs-patch-2
Oct 19, 2024
Merged

refactor(lib/validation): remove redundant regex quantifier#5751
Fdawgs merged 1 commit into
mainfrom
Fdawgs-patch-2

Conversation

@Fdawgs

@Fdawgs Fdawgs commented Oct 19, 2024

Copy link
Copy Markdown
Member

Not having a quantifier is the same as {1}. This is just giving the regex engine extra work.

This PR also replaces [0-9] with the shorter \d syntax, and consolidates two similar alternatives into one.

Checklist

Not having a quantifier is the same as `{1}`. This is just giving the regex engine extra work.

Signed-off-by: Frazer Smith <frazer.dev@icloud.com>
Comment thread lib/validation.js

@Uzlopak Uzlopak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OK! It is the same.
LGTM

@Fdawgs Fdawgs merged commit 5aa86f8 into main Oct 19, 2024
@Fdawgs Fdawgs deleted the Fdawgs-patch-2 branch October 19, 2024 19:34
@github-actions

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants