Check if a value is a number
JavaScript version
const isNumber = (value) => !isNaN(parseFloat(value)) && isFinite(value);
TypeScript version
const isNumber = (value: any): number => !isNaN(parseFloat(value)) && isFinite(value);
JavaScript version
const isNumber = (value) => !isNaN(parseFloat(value)) && isFinite(value);
TypeScript version
const isNumber = (value: any): number => !isNaN(parseFloat(value)) && isFinite(value);