Comparing version 0.0.7 to 0.0.8
@@ -32,2 +32,5 @@ // Cycle Icon designed by Nick Remis - http://www.thenounproject.com/nremis/ | ||
Ordine.prototype.enqueue = function(procc,waitPrevious){ | ||
if (this.procs.length === 0){ | ||
waitPrevious = false; | ||
} | ||
this.procs.push({ | ||
@@ -34,0 +37,0 @@ proc : procc, |
@@ -1,2 +0,2 @@ | ||
!function(a){"use strict";var b=function(a){return this.finalCallback=a.callback||!1,this.procs=[],this.completedprocs=0,this.waiting=!1,"function"==typeof a&&(this.finalCallback=a),this};"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(exports=module.exports=b),module.exports=b),a.Ordine=b}(this),function(a){a.prototype.enqueue=function(a,b){return this.procs.push({proc:a,wait:b||!1}),this}}(this.Ordine),function(a){a.prototype.loop=function(a){if(a)for(var b in this.procs)b>=this.waiting.proc&&(b===this.waiting.proc?this.procs[b].proc():this.procs[b].wait?this.waiting={shoudI:!0,proc:b}:this.procs[b].proc());else{a=0;for(var c in this.procs)this.waiting.shoudI||(this.procs[c].wait?this.waiting={shoudI:!0,proc:c}:this.procs[c].proc())}}}(this.Ordine),function(a){a.prototype.next=function(){this.completedprocs+=1,this.procs.length===this.completedprocs&&this.finalCallback(),this.waiting.shoudI&&this.waiting.proc==this.completedprocs&&(this.waiting.shoudI=!1,this.resume())}}(this.Ordine),function(a){a.prototype.resume=function(){this.loop(this.waiting.proc)}}(this.Ordine),function(a){a.prototype.run=function(){return this.loop(),this}}(this.Ordine); | ||
!function(a){"use strict";var b=function(a){return this.finalCallback=a.callback||!1,this.procs=[],this.completedprocs=0,this.waiting=!1,"function"==typeof a&&(this.finalCallback=a),this};"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(exports=module.exports=b),module.exports=b),a.Ordine=b}(this),function(a){a.prototype.enqueue=function(a,b){return 0===this.procs.length&&(b=!1),this.procs.push({proc:a,wait:b||!1}),this}}(this.Ordine),function(a){a.prototype.loop=function(a){if(a)for(var b in this.procs)b>=this.waiting.proc&&(b===this.waiting.proc?this.procs[b].proc():this.procs[b].wait?this.waiting={shoudI:!0,proc:b}:this.procs[b].proc());else{a=0;for(var c in this.procs)this.waiting.shoudI||(this.procs[c].wait?this.waiting={shoudI:!0,proc:c}:this.procs[c].proc())}}}(this.Ordine),function(a){a.prototype.next=function(){this.completedprocs+=1,this.procs.length===this.completedprocs&&this.finalCallback(),this.waiting.shoudI&&this.waiting.proc==this.completedprocs&&(this.waiting.shoudI=!1,this.resume())}}(this.Ordine),function(a){a.prototype.resume=function(){this.loop(this.waiting.proc)}}(this.Ordine),function(a){a.prototype.run=function(){return this.loop(),this}}(this.Ordine); | ||
//# sourceMappingURL=ordine.min.js.map |
{ | ||
"name": "ordine", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Callbacks made almost easy.", | ||
@@ -5,0 +5,0 @@ "main": "dist/ordine.js", |
;(function(Ordine) { | ||
Ordine.prototype.enqueue = function(procc,waitPrevious){ | ||
if (this.procs.length === 0){ | ||
waitPrevious = false; | ||
} | ||
this.procs.push({ | ||
@@ -4,0 +7,0 @@ proc : procc, |
Sorry, the diff of this file is not supported yet
11518
247