Skip to content

minlare/splice-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

splice-clone

Splice and clone javascript arrays

NPM

Usage

Takes an array as first argument, followed by standard Array.prototype.splice arguments.

import spliceClone from 'splice-clone';

const arr = [1, 2, 3];

const arr2 = spliceClone(arr, 1, 0, 1.5);
// arr2 = [1, 1.5, 2, 3]

About

Splice and clone javascript arrays

Resources

Stars

Watchers

Forks

Packages

No packages published