Comparing version 4.4.0 to 4.5.0
4.4.0 / 2014-02-14 | ||
4.5.0 / 2015-03-17 | ||
================== | ||
* support regular functions (that return promises) | ||
4.4.0 / 2015-02-14 | ||
================== | ||
* refactor `isGeneratorFunction` | ||
@@ -9,3 +14,3 @@ * expose generator function from `co.wrap()` | ||
4.3.0 / 2014-02-05 | ||
4.3.0 / 2015-02-05 | ||
================== | ||
@@ -12,0 +17,0 @@ |
@@ -45,3 +45,3 @@ | ||
var ctx = this; | ||
if (typeof gen === 'function') gen = gen.call(this); | ||
// we wrap everything in a promise to avoid promise chaining, | ||
@@ -51,2 +51,5 @@ // which leads to memory leak errors. | ||
return new Promise(function(resolve, reject) { | ||
if (typeof gen === 'function') gen = gen.call(ctx); | ||
if (!gen || typeof gen.next !== 'function') return resolve(gen); | ||
onFulfilled(); | ||
@@ -53,0 +56,0 @@ |
{ | ||
"name": "co", | ||
"version": "4.4.0", | ||
"version": "4.5.0", | ||
"description": "generator async control flow goodness", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -120,3 +120,3 @@ # co | ||
Nested `yieldable`s are supported, meaning you can nest | ||
Nested `yieldable` objects are supported, meaning you can nest | ||
promises within objects within arrays, and so on! | ||
@@ -123,0 +123,0 @@ |
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
15611
204