UNPKG

imma

Version:

A collection of functions for dealing with native arrays and objects immutably

7 lines (6 loc) 213 B
'use strict' const splice = module.exports = (array, index, removeNum, ...values) => { const head = array.slice(0, index) const tail = array.slice(index + removeNum) return head.concat(values, tail) }