pickArrayItems()function
pickArrayItems(items: PossibleArray<T>, ...pick: T[]): ImmutableArray<T>
| Param | Type | |
|---|---|---|
items | PossibleArray<T> | The array or iterable to pick from. required |
pick | T[] | The items to keep. required |
| Return | |
|---|---|
ImmutableArray<T> | A new array containing only the picked items, or the same array if nothing changed. |
Pick multiple items from an array (immutably) and return a new array with those items (or the same array if no changes were made).