Skip to content

Commit bf10ac2

Browse files
committed
Merge commit 'pullrequests/FrantzUml/patch-1'
* commit 'pullrequests/FrantzUml/patch-1': Update convert-case.js
2 parents a3dc8ad + 6dda3ed commit bf10ac2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/utils/convert-case.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,10 @@ export function toSentence(string) {
5757
// Checks whether character is Uppercase.
5858
// Crude version. Checks only A-Z.
5959
function isCaps(char) {
60-
if (char.match(/[A-Z]/)) return true
61-
return false
60+
return /\p{Lu}/u.test(char);
6261
}
6362

6463
// Checks whether character is digit.
6564
function isDigit(char) {
66-
if (char.match(/[0-9]/)) return true
67-
return false
65+
return /[0-9]/.test(char);
6866
}

0 commit comments

Comments
 (0)