omitArrayItems()function

omitArrayItems(items: PossibleArray<T>, ...omit: T[]): ImmutableArray<T>
ParamType
itemsPossibleArray<T>
The array or iterable to remove from. required
omitT[]
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]