Sha256: a5afd926eb89b53d7ed3b7eee063dd566613e5572fe401dac301f1bd8f34e6f4

Contents?: true

Size: 1.32 KB

Versions: 15

Compression:

Stored size: 1.32 KB

Contents

'use strict';
var getPrototypeOf = require('../internals/object-get-prototype-of');
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var has = require('../internals/has');
var wellKnownSymbol = require('../internals/well-known-symbol');
var IS_PURE = require('../internals/is-pure');

var ITERATOR = wellKnownSymbol('iterator');
var BUGGY_SAFARI_ITERATORS = false;

var returnThis = function () { return this; };

// `%IteratorPrototype%` object
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;

if ([].keys) {
  arrayIterator = [].keys();
  // Safari 8 has buggy iterators w/o `next`
  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  else {
    PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  }
}

if (IteratorPrototype == undefined) IteratorPrototype = {};

// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {
  createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
}

module.exports = {
  IteratorPrototype: IteratorPrototype,
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
};

Version data entries

15 entries across 15 versions & 5 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/core-js/internals/iterators-core.js
disco_app-0.18.0 test/dummy/node_modules/core-js/internals/iterators-core.js
disco_app-0.18.2 test/dummy/node_modules/core-js/internals/iterators-core.js
tang-0.2.1 spec/tang_app/node_modules/core-js/internals/iterators-core.js
tang-0.2.0 spec/tang_app/node_modules/core-js/internals/iterators-core.js
tang-0.1.0 spec/tang_app/node_modules/core-js/internals/iterators-core.js
tang-0.0.9 spec/tang_app/node_modules/core-js/internals/iterators-core.js
enju_library-0.3.8 spec/dummy/node_modules/core-js/internals/iterators-core.js
condenser-0.3 lib/condenser/processors/node_modules/core-js-pure/internals/iterators-core.js
condenser-0.2 lib/condenser/processors/node_modules/core-js-pure/internals/iterators-core.js
condenser-0.1 lib/condenser/processors/node_modules/core-js-pure/internals/iterators-core.js
condenser-0.0.12 lib/condenser/processors/node_modules/core-js-pure/internals/iterators-core.js
condenser-0.0.11 lib/condenser/processors/node_modules/core-js-pure/internals/iterators-core.js
condenser-0.0.10 lib/condenser/processors/node_modules/core-js-pure/internals/iterators-core.js
condenser-0.0.9 lib/condenser/processors/node_modules/core-js-pure/internals/iterators-core.js