drop-every
v1.0.0
Published
Returns an array of every nth item in the array dropped
Downloads
17
Maintainers
Readme
drop-every
Returns an array of every nth item in the array dropped
Installation
npm install drop-every --save
Usage
const dropEvery = require('drop-every');
dropEvery([1, 2, 3, 4, 5], 2);
//=> [1, 3, 5]
dropEvery([1, 2, 3, 4, 5], 3);
//=> [1, 2, 4, 5]
dropEvery([1, 2, 3, 4, 5], n => n < 3));
//=> [3, 4, 5]
License
MIT © Daniel Eckermann