Skip to content

Commit 6dfff38

Browse files
committed
[Robustness] use get-proto
1 parent 5cc3c2d commit 6dfff38

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var toStr = Object.prototype.toString;
44
var fnToStr = Function.prototype.toString;
55
var isFnRegex = /^\s*(?:function)?\*/;
66
var hasToStringTag = require('has-tostringtag/shams')();
7-
var getProto = Object.getPrototypeOf;
7+
var getProto = require('get-proto');
88
var getGeneratorFunc = function () { // eslint-disable-line consistent-return
99
if (!hasToStringTag) {
1010
return false;

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"url": "https://github.com/inspect-js/is-generator-function/issues"
4343
},
4444
"dependencies": {
45+
"get-proto": "^1.0.0",
4546
"has-tostringtag": "^1.0.2"
4647
},
4748
"devDependencies": {

0 commit comments

Comments
 (0)