yocto-queue - npm
https://www.npmjs.com/package/yocto-queueyocto-queue . Tiny queue data structure. You should use this package instead of an array if you do a lot of Array#push() and Array#shift() on large arrays, since Array#shift() has linear time complexity O(n) while Queue#dequeue() has constant time complexity O(1).That makes a huge difference for large arrays.
yocto-queue - npm
www.npmjs.com › package › yocto-queueyocto-queue . Tiny queue data structure. You should use this package instead of an array if you do a lot of Array#push() and Array#shift() on large arrays, since Array#shift() has linear time complexity O(n) while Queue#dequeue() has constant time complexity O(1).