Fixed redundant part of digit regex

This commit is contained in:
Alexis
2025-05-07 14:31:35 +02:00
parent 46d7aa74f9
commit 245fb421b3

View File

@@ -5,7 +5,7 @@
* @returns Result of the test
*/
export function isDigit(str: string) {
return RegExp(/^\d{1}$/g).test(str)
return RegExp(/^\d$/g).test(str)
}
/**