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-preact-10.5.7 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-preact-10.5.6 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-preact-10.5.5 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-preact-10.5.4 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.6 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-preact-10.5.3 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.5 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-preact-10.5.2 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.4 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
isomorfeus-redux-4.1.3 node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js