Skip to content

isNumber

Functions to check the type of value if it's number or numeric string.

isNumber function

ts
function isNumber(value: unknown): boolean

Checks if value is classified as a primitive number.

Parameters

  • value: unknown The value to check.

Return boolean

true if value is a number, otherwise false.

isNumberObject function

ts
function isNumberObject(value: unknown): boolean

Checks if value is classified as a Number primitive or object.

Parameters

  • value: unknown The value to check.

Return boolean

true if value is a number or Number object, otherwise false.

isNumeric function

ts
function isNumeric(value: unknown): boolean

Checks if value is classified as a primitive number or numeric string.

Parameters

  • value: unknown The value to check.

Return boolean

true if value is a number or numeric string, otherwise false.

MIT License, Made with ❤️