Skip to content

@technobuddha > library > String > Categorization

Function: isNumeric()

ts
function isNumeric(input: unknown): input is string | number;

Defined in: is-numeric.ts:13

Test an object to see if it a number, or a string which can be converted into a number

Parameters

ParameterTypeDescription
inputunknownthe object to test

Returns

input is string | number

true, if the object is a number, or can be converted to a number