Skip to content

removeArrayBlank ​

移除数组中值为 null 或 undefined 的元素。

使用 ​

ts
import { removeArrayBlank } from 'rattail'

removeArrayBlank([1, null, 2, undefined, 3]) // return [1, 2, 3]

参数 ​

参数类型默认值
arrArray

返回值 ​

类型
Array