thunkify-wrap
Advanced tools
Comparing version 1.0.1 to 1.0.2
1.0.2 / 2014-07-31 | ||
================== | ||
* is generator function filter | ||
1.0.1 / 2014-07-10 | ||
@@ -3,0 +8,0 @@ ================== |
11
index.js
@@ -73,2 +73,6 @@ /**! | ||
function thunkify(fn, ctx) { | ||
if (isGeneratorFunction(fn)) { | ||
return fn; | ||
} | ||
if (fn.toString() === thunk.toString()) { | ||
@@ -115,5 +119,6 @@ return fn; | ||
function genify(fn, ctx) { | ||
if (fn.constructor.name === 'GeneratorFunction') { | ||
if (isGeneratorFunction(fn)) { | ||
return fn; | ||
} | ||
function* genify() { | ||
@@ -179,1 +184,5 @@ var thunk = thunkify(fn); | ||
}; | ||
function isGeneratorFunction(fn) { | ||
return typeof fn === 'function' && fn.constructor.name === 'GeneratorFunction'; | ||
} |
{ | ||
"name": "thunkify-wrap", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"repository": "dead-horse/node-thunkify-wrap", | ||
@@ -5,0 +5,0 @@ "description": "Turn callbacks, arrays, generators, generator functions, and promises into a thunk", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
10526
252
0