1.0.1 • Published 7 years ago

unpop v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

unpopping

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

require('unpop');
const myArray = [1, 2, 3];
myArray.unpop(4);
console.log(myArray); // [1, 2, 3, 4]
1.0.1

7 years ago

1.0.0

7 years ago