mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-18 17:54:13 +02:00
refactor(arabot): add string type to isNumber function
This commit is contained in:
parent
81f5db4b0a
commit
b39cf0b44d
@ -19,10 +19,10 @@
|
||||
|
||||
/**
|
||||
* Checks if any parsed value is a number.
|
||||
* @param number check if variable is a number
|
||||
* @param number check if a string is a number
|
||||
* @returns {boolean} true if it is a number
|
||||
*/
|
||||
export function isNumber(number: any) {
|
||||
export function isNumber(number: string) {
|
||||
return !Number.isNaN(+number);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user