Skip to content
pyautark (soon)

@urban-toolkit/autk-core


@urban-toolkit/autk-core / isNumericLike

Function: isNumericLike()

isNumericLike(value): boolean

Defined in: utils-data.ts:41

Returns true when the value can be treated as a finite numeric scalar.

Parameters

value

unknown

Value to test for numeric scalar compatibility.

Returns

boolean

true when the value is a finite number or numeric string.

Throws

Never throws.

Example

ts
isNumericLike(42);       // true
isNumericLike('3.14');   // true
isNumericLike('');       // false
isNumericLike(NaN);      // false

Released under the MIT License.