Package Exports
- starry.filter
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (starry.filter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Member of the starry suite—modular functions for iterable objects.
Status
Applies to the whole suite.
Usage
function filter<T = any>(
iterable: Iterable<T>,
predicate: (item: T) => boolean = x => x as any
): Iterable<T>
Returns a new iterable that only contains the elements from iterable
that satisfies predicate
.
Parameters:
- iterable:
Iterable<T>
- predicate:
(T) => boolean
. Default:x => x
Returns: Iterable<T>