HamroKhanpin/hamrokhaanpaan/wp-content/__plugins/wp-optimize/js/queue-3-2-3.min.js
2024-04-29 13:12:44 +05:45

1 line
530 B
JavaScript

function Updraft_Queue(){var t=[],n=0,e=!1;this.get_length=function(){return t.length-n},this.is_empty=function(){return 0==t.length},this.enqueue=function(n){t.push(n)},this.is_locked=function(){return e},this.get_lock=function(){return!e&&(this.lock(),!0)},this.dequeue=function(){if(0!=t.length){var e=t[n];return 2*++n>=t.length&&(t=t.slice(n),n=0),e}},this.lock=function(){e=!0},this.unlock=function(){e=!1},this.peek=function(){return t.length>0?t[n]:void 0},this.replace_front=function(e){return!(t.length<1)&&(t[n]=e,!0)}}