sparse-splice

1.0.1 • Public • Published

sparse-splice

NPM Version Build Status Coverage Status

Like Array.splice but instead of removing a consecutive range of elements this module allows for the elements to be scattered all over the array.

Installation

npm install --save sparse-splice

Usage

var cats = [ 'Dusty'
           , 'Casper'
           , 'Samantha'
           , 'Maggie'
           , 'Chester'
           , 'Sadie'
           , 'Coco'
           , 'Lola'
           ]
 
// Remove Sadie, Coco and Maggie
require('sparse-splice')(cats, [5, 6, 3])
 
// cats = ['Dusty', 'Casper', 'Samantha', 'Chester', 'Lola']

Readme

Keywords

Package Sidebar

Install

npm i sparse-splice

Weekly Downloads

1

Version

1.0.1

License

ISC

Last publish

Collaborators

  • keis