omitArrayItems()function
omitArrayItems(items: PossibleArray<T>, ...omit: T[]): ImmutableArray<T>
| Param | Type | |
|---|---|---|
items | PossibleArray<T> | The array or iterable to remove from. required |
omit | T[] | The items to remove. required |
| Return | |
|---|---|
ImmutableArray<T> | A new array without the omitted items, or the same array if nothing changed. |
Remove multiple items from an array (immutably) and return a new array without those items (or the same array if no changes were made).
Examples
omitArrayItems([1, 2, 3], 2); // [1, 3]