source: trip-planner-front/node_modules/core-js/internals/create-iterator-constructor.js@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 746 bytes
Line 
1'use strict';
2var IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;
3var create = require('../internals/object-create');
4var createPropertyDescriptor = require('../internals/create-property-descriptor');
5var setToStringTag = require('../internals/set-to-string-tag');
6var Iterators = require('../internals/iterators');
7
8var returnThis = function () { return this; };
9
10module.exports = function (IteratorConstructor, NAME, next) {
11 var TO_STRING_TAG = NAME + ' Iterator';
12 IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
13 setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
14 Iterators[TO_STRING_TAG] = returnThis;
15 return IteratorConstructor;
16};
Note: See TracBrowser for help on using the repository browser.