WXL
3 天以前 9bce51f651aad297ef9eb6df832bfdaf1de05d84
node_modules/webpack/lib/util/Queue.js
@@ -6,10 +6,13 @@
"use strict";
/**
 * FIFO queue that keeps items unique by storing them in insertion order inside
 * a `Set`.
 * @template T
 */
class Queue {
   /**
    * Seeds the queue with an optional iterable of initial unique items.
    * @param {Iterable<T>=} items The initial elements.
    */
   constructor(items) {
@@ -21,7 +24,7 @@
   }
   /**
    * Returns the number of elements in this queue.
    * Returns the number of unique items currently waiting in the queue.
    * @returns {number} The number of elements in this queue.
    */
   get length() {
@@ -29,7 +32,7 @@
   }
   /**
    * Appends the specified element to this queue.
    * Enqueues an item, moving nothing if that value is already present.
    * @param {T} item The element to add.
    * @returns {void}
    */
@@ -38,7 +41,7 @@
   }
   /**
    * Retrieves and removes the head of this queue.
    * Removes and returns the oldest enqueued item.
    * @returns {T | undefined} The head of the queue of `undefined` if this queue is empty.
    */
   dequeue() {