Skip to content

Commit 24f6021

Browse files
committed
[Refactor] use iterator.prototype
1 parent e10dfa0 commit 24f6021

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/map-iterator.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
var SLOT = require('internal-slot');
44
var setToStringTag = require('es-set-tostringtag');
55

6-
var GetIntrinsic = require('get-intrinsic');
76
var CreateIterResultObject = require('es-abstract/2024/CreateIterResultObject');
87
var DefineMethodProperty = require('es-abstract/2024/DefineMethodProperty');
98
var OrdinaryObjectCreate = require('es-abstract/2024/OrdinaryObjectCreate');
@@ -22,7 +21,7 @@ var MapIterator = function MapIterator(map, kind) {
2221
SLOT.set(this, '[[kind]]', kind);
2322
};
2423

25-
var IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);
24+
var IteratorPrototype = require('iterator.prototype');
2625
if (IteratorPrototype) {
2726
MapIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);
2827
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"has-proto": "^1.2.0",
7474
"has-symbols": "^1.1.0",
7575
"internal-slot": "^1.0.7",
76+
"iterator.prototype": "^1.1.3",
7677
"object.entries": "^1.1.8"
7778
},
7879
"auto-changelog": {

0 commit comments

Comments
 (0)