Return true if the given value is a number.
isNumber(0); // => trueisNumber("0"); // => falseisNumber(NaN); // => false
npx atmx add helper is-number
Copy and paste the following method into @/utils/helpers/undefined.ts:
@/utils/helpers/undefined.ts
/*** Return true if the given value is a number.** @example* isNumber(0) // => true* isNumber('0') // => false* isNumber(NaN) // => false*/export function isNumber(value: unknown): value is number {return typeof value === "number" && !Number.isNaN(value);}