other-queue
Version:
Queue in JavaScript
2 lines • 1 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("queue",[],t):"object"==typeof exports?exports.queue=t():e.queue=t()}("undefined"!=typeof self?self:this,(function(){return(()=>{"use strict";var e={355:(e,t,n)=>{n.d(t,{default:()=>o});const o=function(){var e=[],t=0;this.enqueue=function(t){e.push(t)},this.dequeue=function(){if(0!==e.length){var n=e[t];return 2*++t>=e.length&&(e=e.slice(t),t=0),n}},this.peek=function(){return e.length>0?e[t]:void 0},this.getLength=function(){return e.length-t},this.toString=function(){return e.toString()},this.isEmpty=function(){return 0===e.length}}}},t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}return n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n(355)})().default}));
//# sourceMappingURL=queue.min.js.map