toInt
尽可能将给定值转换为整型
157 bytes
since v12.1.0
用法说明
_.toInt 函数会尽可能尝试将给定值转换为整型。
import * as _ from 'radashi'
_.toInt(0) // => 0_.toInt(null) // => 0_.toInt(null, 3) // => 3尽可能将给定值转换为整型
_.toInt 函数会尽可能尝试将给定值转换为整型。
import * as _ from 'radashi'
_.toInt(0) // => 0_.toInt(null) // => 0_.toInt(null, 3) // => 3