taskgroup
Advanced tools
Comparing version 4.0.3 to 4.0.4
// Generated by CoffeeScript 1.7.1 | ||
(function() { | ||
var EventEmitter, Interface, Task, TaskGroup, ambi, csextends, domain, events, queue, util, _ref, | ||
var EventEmitter, Interface, Task, TaskGroup, ambi, csextends, domain, events, queue, util, wait, _ref, | ||
__hasProp = {}.hasOwnProperty, | ||
@@ -26,2 +26,6 @@ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||
wait = function(delay, fn) { | ||
return setTimeout(fn, delay); | ||
}; | ||
Interface = (function(_super) { | ||
@@ -158,3 +162,3 @@ __extends(Interface, _super); | ||
function Task() { | ||
var args, _base, _base1; | ||
var args, _base, _base1, _base2, _base3; | ||
args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
@@ -171,2 +175,8 @@ Task.__super__.constructor.apply(this, arguments); | ||
} | ||
if ((_base2 = this.config).ambi == null) { | ||
_base2.ambi = true; | ||
} | ||
if ((_base3 = this.config).domain == null) { | ||
_base3.domain = true; | ||
} | ||
if (this.events == null) { | ||
@@ -358,3 +368,3 @@ this.events = []; | ||
args = (this.config.args || []).concat([this.exit.bind(this)]); | ||
if ((this.taskDomain != null) === false && ((domain != null ? domain.create : void 0) != null)) { | ||
if (this.config.domain !== false && (this.taskDomain != null) === false && ((domain != null ? domain.create : void 0) != null)) { | ||
this.taskDomain = domain.create(); | ||
@@ -370,3 +380,3 @@ this.taskDomain.on('error', this.exit.bind(this)); | ||
if (me.config.timeout) { | ||
me.timeout = setTimeout(function() { | ||
me.timeout = wait(me.config.timeout, function() { | ||
if (me.isComplete() === false) { | ||
@@ -376,5 +386,9 @@ err = new Error("The task [" + (me.getNames()) + "] has timed out."); | ||
} | ||
}, me.config.timeout); | ||
}); | ||
} | ||
return ambi.apply(null, [methodToFire].concat(__slice.call(args))); | ||
if (me.config.ambi !== false) { | ||
return ambi.apply(null, [methodToFire].concat(__slice.call(args))); | ||
} else { | ||
return methodToFire.apply(null, args); | ||
} | ||
} else { | ||
@@ -381,0 +395,0 @@ err = new Error("The task [" + (me.getNames()) + "] was fired but has no method to fire"); |
{ | ||
"title": "TaskGroup", | ||
"name": "taskgroup", | ||
"version": "4.0.3", | ||
"version": "4.0.4", | ||
"description": "Group together synchronous and asynchronous tasks and execute them with support for concurrency, naming, and nesting.", | ||
@@ -47,2 +47,3 @@ "homepage": "https://github.com/bevry/taskgroup", | ||
}, | ||
"browsers": true, | ||
"engines": { | ||
@@ -57,7 +58,7 @@ "node": ">=0.8" | ||
"coffee-script": "~1.7.1", | ||
"joe": "~1.4.0", | ||
"joe": "~1.5.0", | ||
"joe-reporter-console": "~1.2.1", | ||
"chai": "~1.9.1", | ||
"projectz": "~0.3.11", | ||
"biscotto": "^2.1.2" | ||
"projectz": "~0.3.15", | ||
"biscotto": "^2.2.1" | ||
}, | ||
@@ -64,0 +65,0 @@ "directories": { |
@@ -38,2 +38,11 @@ <!-- TITLE/ --> | ||
### [Browserify](http://browserify.org/) | ||
- Use: `require('taskgroup')` | ||
- Install: `npm install --save taskgroup` | ||
- CDN URL: `//wzrd.in/bundle/taskgroup@4.0.4` | ||
### [Ender](http://ender.jit.su/) | ||
- Use: `require('taskgroup')` | ||
- Install: `ender add taskgroup` | ||
<!-- /INSTALL --> | ||
@@ -40,0 +49,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
382974
1311
121