Sha256: b8c2e53ee1575f494bb7e077c147402fca982832026e6b065ef2d95601eefd55

Contents?: true

Size: 936 Bytes

Versions: 25

Compression:

Stored size: 936 Bytes

Contents

var wellKnownSymbol = require('../internals/well-known-symbol');

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

try {
  var called = 0;
  var iteratorWithReturn = {
    next: function () {
      return { done: !!called++ };
    },
    'return': function () {
      SAFE_CLOSING = true;
    }
  };
  iteratorWithReturn[ITERATOR] = function () {
    return this;
  };
  // eslint-disable-next-line no-throw-literal
  Array.from(iteratorWithReturn, function () { throw 2; });
} catch (error) { /* empty */ }

module.exports = function (exec, SKIP_CLOSING) {
  if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  var ITERATION_SUPPORT = false;
  try {
    var object = {};
    object[ITERATOR] = function () {
      return {
        next: function () {
          return { done: ITERATION_SUPPORT = true };
        }
      };
    };
    exec(object);
  } catch (error) { /* empty */ }
  return ITERATION_SUPPORT;
};

Version data entries

25 entries across 25 versions & 7 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/core-js/internals/check-correctness-of-iteration.js
disco_app-0.18.0 test/dummy/node_modules/core-js/internals/check-correctness-of-iteration.js
disco_app-0.18.2 test/dummy/node_modules/core-js/internals/check-correctness-of-iteration.js
tang-0.2.1 spec/tang_app/node_modules/core-js/internals/check-correctness-of-iteration.js
tang-0.2.0 spec/tang_app/node_modules/core-js/internals/check-correctness-of-iteration.js
tang-0.1.0 spec/tang_app/node_modules/core-js/internals/check-correctness-of-iteration.js
tang-0.0.9 spec/tang_app/node_modules/core-js/internals/check-correctness-of-iteration.js
enju_library-0.3.8 spec/dummy/node_modules/core-js/internals/check-correctness-of-iteration.js
condenser-0.3 lib/condenser/processors/node_modules/core-js-pure/internals/check-correctness-of-iteration.js
condenser-0.2 lib/condenser/processors/node_modules/core-js-pure/internals/check-correctness-of-iteration.js
condenser-0.1 lib/condenser/processors/node_modules/core-js-pure/internals/check-correctness-of-iteration.js
condenser-0.0.12 lib/condenser/processors/node_modules/core-js-pure/internals/check-correctness-of-iteration.js
condenser-0.0.11 lib/condenser/processors/node_modules/core-js-pure/internals/check-correctness-of-iteration.js
condenser-0.0.10 lib/condenser/processors/node_modules/core-js-pure/internals/check-correctness-of-iteration.js
condenser-0.0.9 lib/condenser/processors/node_modules/core-js-pure/internals/check-correctness-of-iteration.js
condenser-0.0.8 lib/condenser/processors/node_modules/core-js-pure/internals/check-correctness-of-iteration.js
jester-data-8.0.0 node_modules/core-js/internals/check-correctness-of-iteration.js
ezii-os-5.2.1 node_modules/core-js/internals/check-correctness-of-iteration.js
ezii-os-2.0.1 node_modules/core-js/internals/check-correctness-of-iteration.js
ezii-os-1.1.0 node_modules/core-js/internals/check-correctness-of-iteration.js