Skip to content

Commit fe2139e

Browse files
committed
Use is-generator-function
1 parent 7244fff commit fe2139e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"dependencies": {
2727
"inherits": "2.0.3",
2828
"is-arguments": "^1.0.4",
29+
"is-generator-function": "^1.0.7",
2930
"object.entries": "^1.1.0"
3031
},
3132
"license": "MIT",

support/types.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
'use strict';
55

66
var isArgumentsObject = require('is-arguments');
7+
var isGeneratorFunction = require('is-generator-function');
78

89
function uncurryThis(f) {
910
return f.call.bind(f);
@@ -56,6 +57,8 @@ function isArgumentsObject(value) {
5657
}
5758
exports.isArgumentsObject = isArgumentsObject;
5859

60+
exports.isGeneratorFunction = isGeneratorFunction;
61+
5962
function isArrayBufferView(value) {
6063
return ArrayBufferSupported && ArrayBuffer.isView(value);
6164
}
@@ -214,11 +217,6 @@ function isAsyncFunction(value) {
214217
}
215218
exports.isAsyncFunction = isAsyncFunction;
216219

217-
function isGeneratorFunction(value) {
218-
return ObjectToString(value) === '[object GeneratorFunction]';
219-
}
220-
exports.isGeneratorFunction = isGeneratorFunction;
221-
222220
function isMapIterator(value) {
223221
return ObjectToString(value) === '[object Map Iterator]';
224222
}

0 commit comments

Comments
 (0)