starry.filter
4.0.0 • Public • Published 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>
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 4.0.0
2
Version History
Package Sidebar
Install
Weekly Downloads