source: frontend/node_modules/es-iterator-helpers/Iterator/implementation.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 886 bytes
Line 
1'use strict';
2
3var GetIntrinsic = require('get-intrinsic');
4var hasPropertyDescriptors = require('has-property-descriptors')();
5
6var $TypeError = require('es-errors/type');
7
8var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);
9
10var iterProto = require('iterator.prototype');
11var callBound = require('call-bound');
12
13var $isPrototypeOf = callBound('Object.prototype.isPrototypeOf');
14
15var $Iterator = typeof Iterator === 'function' ? Iterator : function Iterator() {
16 if (
17 !(this instanceof Iterator)
18 || this.constructor === Iterator
19 || !$isPrototypeOf(Iterator, this.constructor)
20 ) {
21 throw new $TypeError('`Iterator` can not be called or constructed directly');
22 }
23};
24
25if ($Iterator.prototype !== iterProto) {
26 $Iterator.prototype = iterProto;
27}
28$defineProperty($Iterator, 'prototype', { writable: false });
29
30module.exports = $Iterator;
Note: See TracBrowser for help on using the repository browser.