Immutable Array Helper
A JavaScript Library for immutable array helpers
How to use
; const a = 1 2 3;const b = ; console; // [1, 2, 3]
Functions
copy()
Copies an array to a new variable.
; const a = 1 2 3;const b = ; console; // [1, 2, 3]
del()
Creates a new array minus given array item.
; const a = 1 2 3;const b = ; console; // [1, 3]
pop()
Removes the last item from the array.
; const a = 1 2 3;const b = ; console; // [1, 2]
push()
Adds a new item at the end of an array.
; const a = 1 2 3;const b = ; console; // [1, 2, 3, 4]
reverse()
Reverses the order of an array.
; const a = 1 2 3;const b = ; console; // [3, 2, 1]
shift()
Removes an item from the beginning of an array.
; const a = 1 2 3;const b = ; console; // [2, 3]
sort()
Sorts an array.
; const a = 1 2 3;const b = ; console; // [3, 2, 1]
splice()
Modifies the contents of an array.
; const a = 1 2 3;const b = ; console; // [1, 2, [7, 8], 5, 6]
unshift()
Adds an item from the beginning of an array.
; const a = 1 2 3;const b = ; console; // [4, 1, 2, 3]