diff options
author | LinuxWizard42 <computerwizard@linuxmail.org> | 2022-10-12 23:08:57 +0300 |
---|---|---|
committer | LinuxWizard42 <computerwizard@linuxmail.org> | 2022-10-12 23:08:57 +0300 |
commit | 726b81b19251674e149ccfbb1abacbd837fc6db0 (patch) | |
tree | fbdbb227dc01357eb76e8222d76185bc124c5ca6 /node_modules/dir-compare/src/fs/Queue.js | |
parent | 34f0890e175698940d49238097579f44e4d78c89 (diff) | |
download | FlashRunner-726b81b19251674e149ccfbb1abacbd837fc6db0.tar.gz FlashRunner-726b81b19251674e149ccfbb1abacbd837fc6db0.tar.zst |
Removed files that should not have been included in git
Diffstat (limited to 'node_modules/dir-compare/src/fs/Queue.js')
-rw-r--r-- | node_modules/dir-compare/src/fs/Queue.js | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/node_modules/dir-compare/src/fs/Queue.js b/node_modules/dir-compare/src/fs/Queue.js deleted file mode 100644 index 4d86dd5..0000000 --- a/node_modules/dir-compare/src/fs/Queue.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - -Queue.js - -A function to represent a queue - -Created by Kate Morley - http://code.iamkate.com/ - and released under the terms -of the CC0 1.0 Universal legal code: - -http://creativecommons.org/publicdomain/zero/1.0/legalcode - -*/ - -var MAX_UNUSED_ARRAY_SIZE = 10000 - -/* Creates a new queue. A queue is a first-in-first-out (FIFO) data structure - - * items are added to the end of the queue and removed from the front. - */ -function Queue() { - - // initialise the queue and offset - var queue = [] - var offset = 0 - - // Returns the length of the queue. - this.getLength = function () { - return (queue.length - offset) - } - - /* Enqueues the specified item. The parameter is: - * - * item - the item to enqueue - */ - this.enqueue = function (item) { - queue.push(item) - } - - /* Dequeues an item and returns it. If the queue is empty, the value - * 'undefined' is returned. - */ - this.dequeue = function () { - - // if the queue is empty, return immediately - if (queue.length === 0) { - return undefined - } - - // store the item at the front of the queue - var item = queue[offset] - - // increment the offset and remove the free space if necessary - if (++offset > MAX_UNUSED_ARRAY_SIZE) { - queue = queue.slice(offset) - offset = 0 - } - - // return the dequeued item - return item - - } -} - -module.exports = Queue |