Skip to content

isNumber

判断一个值是否为数字类型

81 bytes
since v12.1.0

使用方法

传入一个值,将返回布尔值指示该值是否为数字。

import * as _ from 'radashi'
_.isNumber('hello') // => false
_.isNumber(['hello']) // => false
_.isNumber(12) // => true