diff options
author | Holden Rohrer <holden.rohrer@gmail.com> | 2020-01-08 21:07:11 -0500 |
---|---|---|
committer | Holden Rohrer <holden.rohrer@gmail.com> | 2020-01-08 21:07:11 -0500 |
commit | 492af8740f40cb3370dcd11b4f5f27306f21c7fd (patch) | |
tree | 0027334a3bd1d56da22e83f70b571db2686b6bce /tools | |
parent | 77743bffc691d3b304f9176c5ae9c15996e6ca56 (diff) |
queue.enqueue passed as array
Diffstat (limited to 'tools')
-rw-r--r-- | tools/queue.js | 6 |
1 files changed, 3 insertions, 3 deletions
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(); } |