js-queue
Advanced tools
Comparing version 1.0.0 to 2.0.0
{ | ||
"name": "js-queue", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Simple JS queue with auto run for node and browsers", | ||
@@ -9,4 +9,4 @@ "main": "queue.js", | ||
}, | ||
"engines" : { | ||
"node" : ">=1.0.0" | ||
"engines": { | ||
"node": ">=1.0.0" | ||
}, | ||
@@ -32,3 +32,6 @@ "repository": { | ||
}, | ||
"homepage": "https://github.com/RIAEvangelist/js-queue#readme" | ||
"homepage": "https://github.com/RIAEvangelist/js-queue#readme", | ||
"dependencies": { | ||
"easy-stack": "^1.0.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
function Queue(){ | ||
function Queue(asStack){ | ||
Object.defineProperties( | ||
@@ -41,3 +41,3 @@ this, | ||
var stop=false; | ||
function clearQueue(){ | ||
@@ -47,7 +47,7 @@ queue=[]; | ||
} | ||
function getQueue(){ | ||
return queue; | ||
} | ||
function setQueue(val){ | ||
@@ -54,0 +54,0 @@ queue=val; |
@@ -12,2 +12,3 @@ # js-queue Is Great for any queue | ||
7. anything else that needs a queue | ||
8. Anything which needs a stack instead of a queue. | ||
@@ -18,2 +19,4 @@ | ||
` js-queue ` also exposes the ` easy-stack ` stack via ` require('js-queue/stack.js') ` this file exposes an ES6 stack which allows for Last In First Out (LIFO) queuing. This can come in handy depending on your application needs, check out the [easy-stack javascript documentation](https://github.com/RIAEvangelist/easy-stack) it follows the ` js-queue ` interface but is node 6 or greater as it uses ES6 classes. | ||
**npm install js-queue** | ||
@@ -77,3 +80,3 @@ | ||
<!-- this is the only difference --> | ||
<script src='./queue.js'></script> | ||
<script src='./queue-vanilla.js'></script> | ||
<script> | ||
@@ -199,3 +202,3 @@ console.log('my awesome app script'); | ||
//Constructor will extend Queue | ||
MyAwesomeQueue.constructor = MyAwesomeQueue; | ||
MyAwesomeQueue.prototype.constructor = MyAwesomeQueue; | ||
@@ -202,0 +205,0 @@ function MyAwesomeQueue(){ |
13051
7
137
241
1
+ Addedeasy-stack@^1.0.0
+ Addedeasy-stack@1.0.1(transitive)