mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
8 lines
216 B
TypeScript
8 lines
216 B
TypeScript
/**
|
|
* Checks that a variable is a valid number. A valid number
|
|
* must be a "number" type and cannot be NaN
|
|
*/
|
|
export function isValidNumber(n: number): boolean {
|
|
return (typeof n === "number") && !isNaN(n);
|
|
}
|