npm.io
1.2.0 • Published 7 years ago

array-without-fast

Licence
ISC
Version
1.2.0
Deps
0
Size
6 kB
Vulns
0
Weekly
0
Stars
2

array-without

codecov

Lightweight and fast arrayWithout which excludes values from array and creates a new copy. It is written with preformance in mind.

Super quick arrayWithout (Excludes values from array)

Install

npm install array-without-fast

Usage

const arrayWithout = require('array-without-fast');

// ES6 import
import arrayWithout from 'array-without-fast';

const data = [1, 'foo', 10, 25, 'extra', 40, 11, 'apple'];

// Pass exclude values as array
const filteredData = arrayWithout(data, [10, 'extra', 11]);

// Pass exclude values as arguments
const filteredData = arrayWithout(data, 10, 'extra', 11);

// Output
// [1, 'foo', 25, 40, 'apple']

Run tests

npm test

Keywords