is-generator
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -8,3 +8,3 @@ /** | ||
exports = module.exports = function (obj) { | ||
return typeof obj === 'function' && | ||
return obj && | ||
typeof obj.next === 'function' && | ||
@@ -11,0 +11,0 @@ typeof obj.throw === 'function'; |
{ | ||
"name": "is-generator", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Check whether a value is a generator or generator function", | ||
@@ -5,0 +5,0 @@ "main": "is-generator.js", |
@@ -17,3 +17,3 @@ /* global describe, it */ | ||
it('should return true with a generator', function () { | ||
assert(!isGenerator((function* () {})())); | ||
assert(isGenerator((function* () {})())); | ||
}); | ||
@@ -20,0 +20,0 @@ }); |
3874