Comparing version 0.0.2 to 0.0.3
@@ -63,3 +63,2 @@ // Cycle Icon designed by Nick Remis - http://www.thenounproject.com/nremis/ | ||
Ordine.prototype.enqueue = function(procc,waitPrevious){ | ||
console.log('enqueued'); | ||
this.procs.push({ | ||
@@ -136,3 +135,2 @@ proc : procc, | ||
Ordine.prototype.run = function(){ | ||
console.log('run'); | ||
this.loop(); | ||
@@ -139,0 +137,0 @@ return this; |
@@ -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){"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 console.log("enqueued"),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.process==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 console.log("run"),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){"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.process==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.2", | ||
"version": "0.0.3", | ||
"description": "Callbacks made almost easy.", | ||
@@ -5,0 +5,0 @@ "main": "dist/queue.min.js", |
;(function(Ordine) { | ||
Ordine.prototype.enqueue = function(procc,waitPrevious){ | ||
console.log('enqueued'); | ||
this.procs.push({ | ||
@@ -5,0 +4,0 @@ proc : procc, |
;(function(Ordine) { | ||
Ordine.prototype.run = function(){ | ||
console.log('run'); | ||
this.loop(); | ||
@@ -6,0 +5,0 @@ return this; |
Sorry, the diff of this file is not supported yet
12577
268