MCPcopy Create free account
hub / github.com/coopernurse/node-pool / dequeue

Method dequeue

lib/PriorityQueue.js:41–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39 }
40
41 dequeue() {
42 for (let i = 0, sl = this._slots.length; i < sl; i += 1) {
43 if (this._slots[i].length) {
44 return this._slots[i].shift();
45 }
46 }
47 return;
48 }
49
50 get head() {
51 for (let i = 0, sl = this._slots.length; i < sl; i += 1) {

Calls 1

shiftMethod · 0.80

Tested by

no test coverage detected