Comparing version 0.0.11 to 0.0.12
@@ -321,6 +321,9 @@ var utils = require('./lib/utils'); | ||
Asynk.require = function (dependency) { | ||
Asynk.require = function (dependencies) { | ||
if (!utils.isArray(dependencies)) { | ||
dependencies = [dependencies]; | ||
} | ||
_Context.currentTasks.forEach(function(currentTask) { | ||
var current = _Context.tasks[currentTask]; | ||
current.dependencies.push(dependency); | ||
current.dependencies = current.dependencies.concat(dependencies); | ||
}); | ||
@@ -524,2 +527,2 @@ return this; | ||
when: new Deferred().when | ||
}; | ||
}; |
{ | ||
"name": "asynk", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "Asynk is a feature-rich JavaScript library designed to simplify common asynchronous JavaScript programming tasks.", | ||
@@ -5,0 +5,0 @@ "main": "asynk.js", |
@@ -129,2 +129,3 @@ ![asynk.js](http://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Break_dance.svg/512px-Break_dance.svg.png)Asynk.js | ||
* **string:** require a selected task named by alias(string) function. | ||
* **array:** an array of dependencies | ||
@@ -131,0 +132,0 @@ ```javascript |
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
69560
16
1516
452