From 492af8740f40cb3370dcd11b4f5f27306f21c7fd Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Wed, 8 Jan 2020 21:07:11 -0500 Subject: queue.enqueue passed as array --- tools/queue.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/queue.js') diff --git a/tools/queue.js b/tools/queue.js index cbd515b..1e2b073 100644 --- a/tools/queue.js +++ b/tools/queue.js @@ -6,9 +6,9 @@ module.exports = function(delayms, maxExport, call){ let getObjs = (maxExport == 1) ? () => queue.shift() : () => queue.splice(0, maxExport) ; - this.enqueue = function(){ - for (let i = 0; i < arguments.length; i++) - queue.push(arguments[i]); + this.enqueue = function(arr){ + for (item of arr) + queue.push(item); if (open) dequeue(); } -- cgit