compact
compact<
T>(iterable):IterableIterator<T>
Defined in: packages/core/src/iterable/compact.ts:7
Removes null and undefined values from an iterable.
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”iterable
Section titled “iterable”Iterable<T | null | undefined>
Returns
Section titled “Returns”IterableIterator<T>
An iterator yielding only non-null and non-undefined values.