unpop
Annoyed by inconsistent Javascript nomenclature?
- removing an element from the head of an array? shift
- adding an element to the head of an array? unshift
- removing an element from the tail of an array? pop
- adding an element to the tail of an array? unpop - obviously!
Installation
npm install unpop
Examples
;const myArray = 1 2 3;myArray;console; // [1, 2, 3, 4]