2.0.2 • Published 5 years ago

@bakkerjoeri/array-without v2.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

array-without

Exclude one or more items from an array.

Installation

npm install @bakkerjoeri/array-without

Usage

import arrayWithout from '@bakkerjoeri/array-without';

const groceries = ['apple', 'potato', 'pear', 'cucumber', 'orange'];
const noCucumber = arrayWithout(groceries, 'cucumber'); // => ['apple', 'potato', 'pear', 'orange']
const onlyFruits = arrayWithout(groceries, 'potato', 'cucumber'); // => ['apple', 'pear', 'orange']

The function returns a new array without mutating the initial array.

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago