-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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(isAlpha): allow usage of options object #2086
base: master
Are you sure you want to change the base?
feat(isAlpha): allow usage of options object #2086
Conversation
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #2086 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 105 105
Lines 2324 2328 +4
Branches 586 588 +2
=========================================
+ Hits 2324 2328 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
217de86
to
8949343
Compare
Do you want to work on |
@@ -1,5 +1,5 @@ | |||
import assert from 'assert'; | |||
import validator from '../index'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: I don't know what this file is used for, but npm run lint:fix
errors here.
@@ -1,26 +1,38 @@ | |||
import assertString from './util/assertString'; | |||
import { alpha } from './alpha'; | |||
|
|||
export default function isAlpha(_str, locale = 'en-US', options = {}) { | |||
assertString(_str); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am referring to the function isAfter
. Is it because toDate
implicitely runs assertString
in already?
I can't remember where but I think we discussed previously that I do two separate PRs. It would be great if we could just merge this one quickly and then I optimise the PR for |
This PR implements steps 1 and 2 of #1874 for
isAlpha
and builds upon #2075.This PR extracts tests for
isAlpha
into a separate test file ⇾test/validators/isAlpha.test.js
(inspired by #1793).Checklist