Comparing version 0.2.0 to 0.2.1
@@ -38,3 +38,3 @@ /*! | ||
exports.version = '0.2.0'; | ||
exports.version = '0.2.1'; | ||
@@ -633,2 +633,4 @@ /** | ||
var n = nodes[v]; | ||
n.notify = n.notify.filter(doFilter); | ||
n.waitfor = n.waitfor.filter(doFilter); | ||
graph.push(n); | ||
@@ -635,0 +637,0 @@ }); |
@@ -7,2 +7,2 @@ /*! | ||
!function(a,b){typeof module!="undefined"?module.exports=b():typeof define=="function"&&typeof define.amd=="object"?define(b):this[a]=b()}("breeze",function(){function e(a){return a.length===0?null:a.length===1?a[0]:a}function f(a){if(Array.isArray(a)){var b=[];for(var c=0,d=a.length;c<d;c++)b.push(c);return b}return Object.keys(a)}function g(a,b,d){return function(b,f){var g=a[b];g(function(){var g=arguments[0];if(g)return f(g);var h=c.call(arguments,1),i=e(h);d[b]=i,f()})}}function h(a,b){this._iterator=a,this._concurrency=b||10,this._tasks=[],this._err=!1,this.workers=0}function i(a){function e(a){this.id=a,this.notify=[],this.waitfor=[]}function f(a,e){var g=b[a],h=g.id;if(d[a])return;Array.isArray(e)||(e=[]),e.push(h),d[a]=!0,g.notify.forEach(function(a){if(e.indexOf(a)>=0)throw new Error(h+" can not come before "+a);var b=a.toString(),c=e.map(function(a){return a});f(b,c)}),c.unshift(h)}function g(a){return null!==a&&"undefined"!=typeof a}var b={},c=[],d={};a.forEach(function(a){var c=a[0],d=a[1];b[c]||(b[c]=new e(c)),b[d]||(b[d]=new e(d)),~b[d].waitfor.indexOf(c)||b[d].waitfor.push(c),~b[c].notify.indexOf(d)||b[c].notify.push(d)});try{Object.keys(b).forEach(f)}catch(h){return{error:h}}var i=c.filter(g),j=[];return i.forEach(function(a){var c=b[a];j.push(c)}),{path:i,graph:j}}var a={},b=function(){},c=Array.prototype.slice,d=a.exports={};return d.version="0.2.0",d.nextTick="undefined"==typeof process||!process.nextTick?function(a){setTimeout(a,0)}:process.nextTick,d.forEach=function(a,c,d){d=d||b;if(!a.length)return d();var e=a.length;for(var f=0,g=a.length;f<g;f++)c(a[f],function(b){if(b)return d(b);--e||d(null)})},d.forEachSeries=function(a,c,d){function e(b){if(b==a.length)return d();c(a[b],function(c){if(c)return d(c);e(++b)})}d=d||b;if(!a.length)return d();e(0)},d.parallel=function(a,c){c=c||b;var e=f(a),h=Array.isArray(a)?Array(a.length):{},i=g(a,e,h);if(!e.length)return c();d.forEach(e,i,function(a){if(a)return c(a);c(null,h)})},d.series=function(a,c){c=c||b;var e=f(a),h=Array.isArray(a)?Array(a.length):{},i=g(a,e,h);if(!e.length)return c();d.forEachSeries(e,i,function(a){if(a)return c(a);c(null,h)})},d.queue=function(a,b){var c=new h(a,b);return c},Object.defineProperty(h.prototype,"length",{get:function(){return this._tasks.length}}),h.prototype.push=function(a,c,e){c=c||b,Array.isArray(a)||(a=[a]);var f=this._concurrency,g=this.saturated;for(var h=0,i=a.length;h<i;h++){var j=a[h];this._tasks.push({task:j,cb:c}),g&&this._tasks.length===f&&g(),e&&d.nextTick(this.process.bind(this))}},h.prototype.process=function(){var a=this,b=this._concurrency,c=this._iterator;if(this.workers<b&&this.length){if(this._err)return;var d=this._tasks.shift();this.empty&&!this.length&&this.empty(),this.workers++,c(d.task,function(){a.workers--;if(a._err)return;d.cb&&d.cb.apply(d,arguments);var c=arguments[0];c&&(a._err=!0);if(c&&a.onerror)return a.onerror(c);a.drain&&a.length+a.workers===0&&a.drain(),a.process()})}},h.prototype.onerror=null,h.prototype.saturated=null,h.prototype.empty=null,h.prototype.drain=null,d.dag=function(a,c,d,e){function g(a){return l.filter(function(b){return b.id===a})[0]}function j(a,b){d(a,function(d){var e=g(a);e.notify.forEach(function(b){var c=g(b);c.fulfilled.push(a);var d=c.waitfor.length,e=c.fulfilled.length;d===e&&m.push(b,null,!0)}),b(d)})}function k(a){a.fulfilled=[],a.waitfor.length||m.push(a.id)}e=e||b;var f=i(a);if(f.error)return e(f.error);var l=f.graph,m=new h(j,c);l.forEach(k),m.onerror=e,m.drain=e,m.process()},d.dagSeries=function(a,c,e){e=e||b;var f=i(a);if(f.error)return e(f.error);d.forEachSeries(f.path,function(a,b){c(a,b)},e)},a.exports}) | ||
!function(a,b){typeof module!="undefined"?module.exports=b():typeof define=="function"&&typeof define.amd=="object"?define(b):this[a]=b()}("breeze",function(){function e(a){return a.length===0?null:a.length===1?a[0]:a}function f(a){if(Array.isArray(a)){var b=[];for(var c=0,d=a.length;c<d;c++)b.push(c);return b}return Object.keys(a)}function g(a,b,d){return function(b,f){var g=a[b];g(function(){var g=arguments[0];if(g)return f(g);var h=c.call(arguments,1),i=e(h);d[b]=i,f()})}}function h(a,b){this._iterator=a,this._concurrency=b||10,this._tasks=[],this._err=!1,this.workers=0}function i(a){function e(a){this.id=a,this.notify=[],this.waitfor=[]}function f(a,e){var g=b[a],h=g.id;if(d[a])return;Array.isArray(e)||(e=[]),e.push(h),d[a]=!0,g.notify.forEach(function(a){if(e.indexOf(a)>=0)throw new Error(h+" can not come before "+a);var b=a.toString(),c=e.map(function(a){return a});f(b,c)}),c.unshift(h)}function g(a){return null!==a&&"undefined"!=typeof a}var b={},c=[],d={};a.forEach(function(a){var c=a[0],d=a[1];b[c]||(b[c]=new e(c)),b[d]||(b[d]=new e(d)),~b[d].waitfor.indexOf(c)||b[d].waitfor.push(c),~b[c].notify.indexOf(d)||b[c].notify.push(d)});try{Object.keys(b).forEach(f)}catch(h){return{error:h}}var i=c.filter(g),j=[];return i.forEach(function(a){var c=b[a];c.notify=c.notify.filter(g),c.waitfor=c.waitfor.filter(g),j.push(c)}),{path:i,graph:j}}var a={},b=function(){},c=Array.prototype.slice,d=a.exports={};return d.version="0.2.1",d.nextTick="undefined"==typeof process||!process.nextTick?function(a){setTimeout(a,0)}:process.nextTick,d.forEach=function(a,c,d){d=d||b;if(!a.length)return d();var e=a.length;for(var f=0,g=a.length;f<g;f++)c(a[f],function(b){if(b)return d(b);--e||d(null)})},d.forEachSeries=function(a,c,d){function e(b){if(b==a.length)return d();c(a[b],function(c){if(c)return d(c);e(++b)})}d=d||b;if(!a.length)return d();e(0)},d.parallel=function(a,c){c=c||b;var e=f(a),h=Array.isArray(a)?Array(a.length):{},i=g(a,e,h);if(!e.length)return c();d.forEach(e,i,function(a){if(a)return c(a);c(null,h)})},d.series=function(a,c){c=c||b;var e=f(a),h=Array.isArray(a)?Array(a.length):{},i=g(a,e,h);if(!e.length)return c();d.forEachSeries(e,i,function(a){if(a)return c(a);c(null,h)})},d.queue=function(a,b){var c=new h(a,b);return c},Object.defineProperty(h.prototype,"length",{get:function(){return this._tasks.length}}),h.prototype.push=function(a,c,e){c=c||b,Array.isArray(a)||(a=[a]);var f=this._concurrency,g=this.saturated;for(var h=0,i=a.length;h<i;h++){var j=a[h];this._tasks.push({task:j,cb:c}),g&&this._tasks.length===f&&g(),e&&d.nextTick(this.process.bind(this))}},h.prototype.process=function(){var a=this,b=this._concurrency,c=this._iterator;if(this.workers<b&&this.length){if(this._err)return;var d=this._tasks.shift();this.empty&&!this.length&&this.empty(),this.workers++,c(d.task,function(){a.workers--;if(a._err)return;d.cb&&d.cb.apply(d,arguments);var c=arguments[0];c&&(a._err=!0);if(c&&a.onerror)return a.onerror(c);a.drain&&a.length+a.workers===0&&a.drain(),a.process()})}},h.prototype.onerror=null,h.prototype.saturated=null,h.prototype.empty=null,h.prototype.drain=null,d.dag=function(a,c,d,e){function g(a){return l.filter(function(b){return b.id===a})[0]}function j(a,b){d(a,function(d){var e=g(a);e.notify.forEach(function(b){var c=g(b);c.fulfilled.push(a);var d=c.waitfor.length,e=c.fulfilled.length;d===e&&m.push(b,null,!0)}),b(d)})}function k(a){a.fulfilled=[],a.waitfor.length||m.push(a.id)}e=e||b;var f=i(a);if(f.error)return e(f.error);var l=f.graph,m=new h(j,c);l.forEach(k),m.onerror=e,m.drain=e,m.process()},d.dagSeries=function(a,c,e){e=e||b;var f=i(a);if(f.error)return e(f.error);d.forEachSeries(f.path,function(a,b){c(a,b)},e)},a.exports}) |
0.2.1 / 2012-06-16 | ||
================== | ||
* remove console.log | ||
* bug if null was bassed to `dag` | ||
0.2.0 / 2012-06-16 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -24,3 +24,3 @@ /*! | ||
exports.version = '0.2.0'; | ||
exports.version = '0.2.1'; | ||
@@ -619,2 +619,4 @@ /** | ||
var n = nodes[v]; | ||
n.notify = n.notify.filter(doFilter); | ||
n.waitfor = n.waitfor.filter(doFilter); | ||
graph.push(n); | ||
@@ -621,0 +623,0 @@ }); |
@@ -5,3 +5,3 @@ { | ||
"description": "Async flow control utility.", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
37606
1147