Sha256: 5938cbf89d74666a04881725fbc484b98e958dfdf9da0ddddbd9f084d81b6c7d

Contents?: true

Size: 1.37 KB

Versions: 30

Compression:

Stored size: 1.37 KB

Contents

import unsupportedIterableToArray from "./unsupportedIterableToArray.js";
export default function _createForOfIteratorHelper(o, allowArrayLike) {
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];

  if (!it) {
    if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
      if (it) o = it;
      var i = 0;

      var F = function F() {};

      return {
        s: F,
        n: function n() {
          if (i >= o.length) return {
            done: true
          };
          return {
            done: false,
            value: o[i++]
          };
        },
        e: function e(_e) {
          throw _e;
        },
        f: F
      };
    }

    throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  }

  var normalCompletion = true,
      didErr = false,
      err;
  return {
    s: function s() {
      it = it.call(o);
    },
    n: function n() {
      var step = it.next();
      normalCompletion = step.done;
      return step;
    },
    e: function e(_e2) {
      didErr = true;
      err = _e2;
    },
    f: function f() {
      try {
        if (!normalCompletion && it["return"] != null) it["return"]();
      } finally {
        if (didErr) throw err;
      }
    }
  };
}

Version data entries

30 entries across 30 versions & 3 rubygems

Version Path
isomorfeus-redux-4.2.0 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.18 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.17 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.16 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.15 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.14 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.13 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.12 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
disco_app-0.16.1 test/dummy/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.11 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.10 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.9 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
disco_app-0.15.2 test/dummy/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.8 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.7 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
disco_app-0.18.4 test/dummy/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
disco_app-0.18.1 test/dummy/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
disco_app-0.14.0 test/dummy/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js