drop-every

1.0.0 • Public • Published

drop-every

Returns an array of every nth item in the array dropped

travis npm version npm downloads npm license prs Welcome eslint

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

Package Sidebar

Install

npm i drop-every

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • ecrmnn