UNPKG

@burglekitt/gmt

Version:

Temporal-based date and time utilities with timezone support and polyfill integration

12 lines (11 loc) 361 B
/** * Type guard to check if a value is a valid amount (finite number). * * @param value number candidate * @example isValidAmount(10) // true * @example isValidAmount(-5) // true * @returns boolean indicating whether the value is a valid amount */ export function isValidAmount(value) { return typeof value === "number" && Number.isFinite(value); }