array.prototype.unpop 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # Array.prototype.unpop
2
+ Annoyed by inconsistent Javascript nomenclature?
3
+
4
+ - removing an element from the head of an array? *shift*
5
+ - adding an element to the head of an array? *unshift*
6
+ - removing an element from the tail of an array? *pop*
7
+ - adding an element to the tail of an array? **unpop** - obviously!
8
+
9
+ This is a better version of [unpop](https://npmjs.com/unpop) with TS definitions.
10
+ ## Installation
11
+ ```
12
+ npm install array.prototype.unpop
13
+ ```
14
+
15
+ ## Examples
16
+ ```javascript
17
+
18
+ require('array.prototype.unpop');
19
+ const myArray = [1, 2, 3];
20
+ myArray.unpop(4);
21
+ console.log(myArray); // [1, 2, 3, 4]
22
+ ```
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ interface Array<T> {
2
+ unpop(...items: T[]): number
3
+ }
package/index.js ADDED
@@ -0,0 +1 @@
1
+ require("unpop")
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "array.prototype.unpop",
3
+ "version": "1.0.0",
4
+ "description": "Array.prototype.unpop()",
5
+ "keywords": [
6
+ "unpop"
7
+ ],
8
+ "homepage": "https://github.com/10xly/array.prototype.unpop#readme",
9
+ "bugs": {
10
+ "url": "https://github.com/10xly/array.prototype.unpop/issues"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/10xly/array.prototype.unpop.git"
15
+ },
16
+ "license": "MIT",
17
+ "author": "10xly",
18
+ "type": "commonjs",
19
+ "main": "index.js",
20
+ "scripts": {
21
+ "test": "echo \"Error: no test specified\" && exit 1"
22
+ },
23
+ "dependencies": {
24
+ "unpop": "^1.0.1"
25
+ }
26
+ }