Guest User

Untitled

a guest
Oct 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. function Queue(q) {"use strict";
  2. // (C) WebReflection - Mit Style License
  3. var
  4. next = function next() {
  5. return (callback = q.shift()) ? !!callback(q) || !0 : !1;
  6. },
  7. callback
  8. ;
  9. (q.wait = function wait(condition, delay) {
  10. condition || callback && q.unshift(callback);
  11. setTimeout(q.next = next, delay || 0);
  12. })(1);
  13. return q;
  14. }
Add Comment
Please, Sign In to add comment