diff --git a/package.json b/package.json index 5b3b958..6587c8f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spique", - "version": "1.0.7", + "version": "1.0.8", "description": "A spiral deque - high performance and dynamic queue size", "main": "spique.js", "scripts": { diff --git a/spique.js b/spique.js index 5cad24d..c8a3697 100644 --- a/spique.js +++ b/spique.js @@ -13,6 +13,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +"use strict"; module.exports = Spique; function Spique(maxItems, ringSize) { @@ -44,7 +45,7 @@ function Spique(maxItems, ringSize) { // push item(s) onto the end of the buffer this.enqueue = this.push = function() { - for(value of arguments) { + for(var value of arguments) { if(items >= maxItems) return new Error('Buffer is full'); // add another ring if necessary @@ -62,7 +63,7 @@ function Spique(maxItems, ringSize) { // push item(s) onto the start of the buffer this.unshift = function(value) { - for(value of arguments) { + for(var value of arguments) { if(items >= maxItems) return new Error('Buffer is full'); // add another ring if necessary