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

refactor: replace deprecated String.prototype.substr() #1942

Merged
merged 1 commit into from
Jul 17, 2022
Merged

refactor: replace deprecated String.prototype.substr() #1942

merged 1 commit into from
Jul 17, 2022

Conversation

CommanderRoot
Copy link
Contributor

String.prototype.substr() is deprecated so we replace it with String.prototype.slice() which works similarily but isn't deprecated.
.substr() probably isn't going away anytime soon but the change is trivial so it doesn't hurt to do it.

Checklist

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

.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
@codecov
Copy link

codecov bot commented Mar 20, 2022

Codecov Report

Merging #1942 (3cf0f84) into master (c1b21a9) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #1942   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          102       102           
  Lines         2085      2085           
  Branches       472       472           
=========================================
  Hits          2085      2085           
Impacted Files Coverage Δ
src/lib/isDataURI.js 100.00% <100.00%> (ø)
src/lib/isEmail.js 100.00% <100.00%> (ø)
src/lib/isIdentityCard.js 100.00% <100.00%> (ø)
src/lib/isTaxID.js 100.00% <100.00%> (ø)
src/lib/isURL.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 c1b21a9...3cf0f84. Read the comment docs.

Copy link
Member

@rubiin rubiin left a comment

Choose a reason for hiding this comment

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

Looks good

@rubiin rubiin merged commit 2f26bac into validatorjs:master Jul 17, 2022
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