Skip to content

Commit 22bb2f0

Browse files
committed
Updated isLength.js
1 parent 2897ef9 commit 22bb2f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/isLength.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export default function isLength(str, options) {
1313
min = arguments[1] || 0;
1414
max = arguments[2];
1515
}
16-
16+
1717
const presentationSequences = str.match(/(\uFE0F|\uFE0E)/g) || [];
1818
const surrogatePairs = str.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g) || [];
1919
const len = str.length - presentationSequences.length - surrogatePairs.length;
2020
const isInsideRange = len >= min && (typeof max === 'undefined' || len <= max);
2121

22-
if (isInsideRange && Array.isArray(options?.discreteLengths)) {
22+
if (isInsideRange && Array.isArray(options?.discreteLengths)){
2323
return options.discreteLengths.some(discreteLen => discreteLen === len);
2424
}
2525

0 commit comments

Comments
 (0)