Skip to content

Functions ​

isNumeric() ​

isNumeric(value): value is Numeric

是否为数字或字符串数字

Parameters ​

ParameterTypeDescription
valueany检测值

Returns ​

value is Numeric

Example ​

ts
isNumeric(123)
// => true

isNumeric('123')
// => true

Type Aliases ​

Numeric ​

Numeric = string | number