Skip to content
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(isLicensePlate): add support for Swedish license plates #1665

Merged
merged 6 commits into from
Feb 17, 2022

Conversation

elmaxe
Copy link
Contributor

@elmaxe elmaxe commented May 2, 2021

This PR adds support for Swedish license plates.

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)

@codecov
Copy link

codecov bot commented May 3, 2021

Codecov Report

Merging #1665 (97f543a) into master (f055c11) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1665   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          102       102           
  Lines         2072      2073    +1     
  Branches       472       472           
=========================================
+ Hits          2072      2073    +1     
Impacted Files Coverage Δ
src/lib/isLicensePlate.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f055c11...97f543a. Read the comment docs.

profnandaa
profnandaa previously approved these changes Jul 16, 2021
Copy link
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

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

LGTM. Please fix the merge conflict and we should be good to go.

@profnandaa profnandaa added the mc-to-land Just merge-conflict standing between the PR and landing. label Jul 16, 2021
@elmaxe
Copy link
Contributor Author

elmaxe commented Sep 27, 2021

@profnandaa Fixed the merge conflict

Copy link
Member

@tux-tn tux-tn left a comment

Choose a reason for hiding this comment

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

Hello @elmaxe and thank you for your PR. Can you please check my comments below?
In addition to that i have two more general feedbacks:

  • Multiple white-spaces are considered a valid license plate. You should probably trim your string before passing it to the regex validation in order to prevent that.
  • According to the wikipedia page of swedish license plates, a plate can't end with the Ocharacter to prevent it from being confused with 0, i don't see that exception in your regex, am i wrong?

README.md Outdated Show resolved Hide resolved
src/lib/isLicensePlate.js Outdated Show resolved Hide resolved
@elmaxe
Copy link
Contributor Author

elmaxe commented Dec 6, 2021

  • Multiple white-spaces are considered a valid license plate. You should probably trim your string before passing it to the regex validation in order to prevent that.

Fair!

  • According to the wikipedia page of swedish license plates, a plate can't end with the Ocharacter to prevent it from being confused with 0, i don't see that exception in your regex, am i wrong?

Interestingly this is not on the Swedish wikipedia page, but it is correct (source)

@elmaxe elmaxe requested a review from tux-tn December 6, 2021 11:30
Copy link
Member

@tux-tn tux-tn left a comment

Choose a reason for hiding this comment

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

LGTM 🎉 Thank you for taking the time to address my comments

@tux-tn tux-tn added ready-to-land For PRs that are reviewed and ready to be landed 🎉 first-pr and removed mc-to-land Just merge-conflict standing between the PR and landing. labels Dec 6, 2021
Copy link
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 first-pr ready-to-land For PRs that are reviewed and ready to be landed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants