Insert is an array method from array helper that we use to inject or add the data into a new array. We create this method as a function closure, so we can use spread parameter and can be insert multiple data at the same time.
Insert data at the first element of array
$.array.insert(fromArray, atObject, ...allValues*)
//atObject={position: 'first', index: 0} last, before or after
//or
$.array.insertFirst(fromArray, ...allValues*)
// Example:
const fromArray = ['item 1', 'item 2']
$.array.insertFirst(fromArray, 'item 3')
//=> ['item 3', 'item 1', 'item 2']
//or
$.array.insert(fromArray, {position: 'first'}, 'new item')