Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/polkadot/util/array/index.ts>arrayFilter

Package publishing for deno.land/x/polkadot
Go to Latest
function arrayFilter
import { arrayFilter } from "https://deno.land/x/polkadot@0.2.19/util/array/index.ts";

Examples

import { arrayFilter } from 'https://deno.land/x/polkadot@0.2.19/util/mod.ts';

arrayFilter([0, void 0, true, null, false, '']); // [0, true, null, false, '']
arrayFilter([0, void 0, true, null, false, ''], false); // [0, true, false, '']

Type Parameters

optional
T = unknown

Parameters

array: readonly (T | null | undefined)[]
optional
allowNulls = [UNSUPPORTED]