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

perf(isISO31661Alpha2): use a Set along with .has instead of includes #1724

Merged
merged 1 commit into from
Sep 20, 2021

Conversation

jmpaya
Copy link
Contributor

@jmpaya jmpaya commented Sep 15, 2021

perf(isISO31661Alpha2): use a Set along with .has instead of includes
fix(isBIC): refactor use of CountryCodes using Set's methods

Updated isISO31661Alpha2 to use a Set along with .has to reduce complexity from O(n) to O(1) as stated here.
Updated isBIC to use Set's methods instead of Array's.

Checklist

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

fix(isBIC): refactor use of CountryCodes using Set's methods
@codecov
Copy link

codecov bot commented Sep 15, 2021

Codecov Report

Merging #1724 (bd1757c) into master (8c4b3b3) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1724   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          101       101           
  Lines         2005      2005           
  Branches       452       452           
=========================================
  Hits          2005      2005           
Impacted Files Coverage Δ
src/lib/isBIC.js 100.00% <100.00%> (ø)
src/lib/isISO31661Alpha2.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 8c4b3b3...bd1757c. Read the comment docs.

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.

Thank you, nice catch!
LGTM 🎉

@tux-tn tux-tn added the ready-to-land For PRs that are reviewed and ready to be landed label Sep 15, 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 too, thanks for your contrib!

@profnandaa profnandaa merged commit 5b04cc5 into validatorjs:master Sep 20, 2021
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.

3 participants