Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
ae711d6
Added Exact Condition for String Length & Updated README.md
bevatsal1122 Aug 6, 2022
f93cf70
Fixed Small Issue
bevatsal1122 Aug 6, 2022
cdd2192
Updated test/validators.js
bevatsal1122 Aug 6, 2022
27a40c8
Fixed in test/validators.js
bevatsal1122 Aug 6, 2022
cf729d1
Updated test/validators.js for isLength()
bevatsal1122 Aug 6, 2022
be706c4
Updated test/validators.js
bevatsal1122 Aug 6, 2022
db5b0c7
Updated test/validators.js
bevatsal1122 Aug 6, 2022
2e48053
Updated test/validators.js
bevatsal1122 Aug 6, 2022
c194526
Updated test/validators.js
bevatsal1122 Aug 6, 2022
21ec415
Updated test/validators.js
bevatsal1122 Aug 6, 2022
59abfc7
Fixed Small Issue
bevatsal1122 Aug 6, 2022
e1bb810
Fixed Small Issue
bevatsal1122 Aug 6, 2022
7c2c0cf
Fixed Small Issue
bevatsal1122 Aug 6, 2022
3ee58c0
Fixed Small Issue
bevatsal1122 Aug 6, 2022
d3e6ca5
Fixed Small Issue
bevatsal1122 Aug 6, 2022
b850b84
Fixed Small Issue
bevatsal1122 Aug 6, 2022
acfe071
Updated test/validators.js
bevatsal1122 Aug 6, 2022
cdb06a5
Updated test/validators.js
bevatsal1122 Aug 6, 2022
70775b4
Fixed Small Issue
bevatsal1122 Aug 6, 2022
a71b7ff
Renamed isPerfect to isValid
bevatsal1122 Aug 8, 2022
dc42e7f
Removed Backwards Compatibility for exact Feature
bevatsal1122 Aug 13, 2022
fb0def3
Fixed Minor Bug
bevatsal1122 Aug 13, 2022
ec1aa91
Fixed Small Issue
bevatsal1122 Aug 13, 2022
73dc505
Fixed Small Issue
bevatsal1122 Aug 13, 2022
c7605bc
Updated README.md, isLength.js & validators.js Files
bevatsal1122 Aug 13, 2022
93ac65f
Updated validators.js in test Folder
bevatsal1122 Aug 13, 2022
bc693dc
Included exact out of range Test
bevatsal1122 Aug 13, 2022
a90171f
Added Additional Test in validators.js for isLength
bevatsal1122 Aug 14, 2022
57a5633
Update src/lib/isLength.js
bevatsal1122 Nov 12, 2022
642e603
Update isLength.js
bevatsal1122 Nov 12, 2022
bb02daf
Updated discreteLengths only to be array
bevatsal1122 Nov 12, 2022
2a0a428
Resolved minor merged conflicts
bevatsal1122 Nov 12, 2022
1bf1ee4
Fixed minor bug
bevatsal1122 Nov 12, 2022
9fd65ed
Fixed minor bug
bevatsal1122 Nov 12, 2022
fd90691
Fixed tests for isLength
bevatsal1122 Nov 12, 2022
d09738c
Fixed minor bug
bevatsal1122 Nov 12, 2022
11aa19f
Minor test bug fixed
bevatsal1122 Nov 13, 2022
e63e7a5
Fixed minor bug in test/validator.js
bevatsal1122 Nov 13, 2022
3ef2588
Merge branch 'validatorjs:master' into MergeProposal
bevatsal1122 Nov 13, 2022
3b5cbd9
Update src/lib/isLength.js
bevatsal1122 Nov 18, 2022
2897ef9
Added blank lines between statements
bevatsal1122 Nov 18, 2022
22bb2f0
Updated isLength.js
bevatsal1122 Nov 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed minor bug
  • Loading branch information
bevatsal1122 committed Nov 12, 2022
commit 9fd65ed2386a46abaa4b2a312915e896681c49c5
2 changes: 1 addition & 1 deletion src/lib/isLength.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function isLength(str, options) {
const len = str.length - presentationSequences.length - surrogatePairs.length;
const isInsideRange = len >= min && (typeof max === 'undefined' || len <= max);
if (isInsideRange && Array.isArray(options?.discreteLengths)) {
return options.discreteLengths.some(discreteLen =>discreteLen === len);
return options.discreteLengths.some(discreteLen => discreteLen === len);
}
return isInsideRange;
}