4 lines
84 B
TypeScript
4 lines
84 B
TypeScript
export function onlyNumbers(str: string): boolean {
|
|
return /^[0-9]+$/.test(str);
|
|
}
|