Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit a635daa

Browse files
committed
feat(helper.ts): Added isNumeric function to check if a property is a number
1 parent b72cd78 commit a635daa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/_internal/utils/helper.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ export const isClassesObjectType = (object: any): object is ClassesObjectType =>
1010
return typeof object === 'object' && !Array.isArray(object);
1111
};
1212

13+
// Block the bug selector if the property is only numbers.
14+
export const isNumeric = (value: string): boolean => {
15+
return /^\d+$/.test(value);
16+
};
17+
1318
const dir = (direname: string, relativePath: string) => {
1419
return path.join(direname, relativePath);
1520
};

0 commit comments

Comments
 (0)