@bakkerjoeri/array-without
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @bakkerjoeri/array-without

Weekly Downloads

1

Version

2.0.2

License

MIT

Unpacked Size

2.76 kB

Total Files

8

Last publish

Collaborators

  • bakkerjoeri