pickItems()function
pickItems(items: Iterable<T>, ...pick: T[]): Iterable<T>
| Param | Type | |
|---|---|---|
items | Iterable<T> | The iterable to filter. required |
pick | T[] | The items to keep. required |
| Return | |
|---|---|
Iterable<T> | An iterable yielding only the items found in pick. |
Pick items from an iterable set of items.
- Only yields items that appear in the
picklist.
Examples
Array.from(pickItems([1, 2, 3], 1, 3)) // [1, 3]