UNPKG

filter-nil

Version:

Filters array entries that are null or undefined.

13 lines 383 B
/** @module filter-nil */ declare module "filter-nil" { /** * Returns the passed array without entries that are `null` or `undefined` * @example * import filterNil from "filter-nil" * const result = filterNil(["a", null, "b", , "c", undefined, "d") * ["a", "b", "c", "d"] * @returns {*[]} Cleaned array */ export default function(): any; }