UNPKG

imma

Version:

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

8 lines (7 loc) 199 B
'use strict' const unshift = module.exports = (array, head, ...tail) => const result = array.slice(0) result.unshift(head) if (tail.length > 0) result.unshift(...tail) return result }