source: trip-planner-front/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js@ 1ad8e64

Last change on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.5 KB
Line 
1var unsupportedIterableToArray = require("./unsupportedIterableToArray.js");
2
3function _createForOfIteratorHelper(o, allowArrayLike) {
4 var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
5
6 if (!it) {
7 if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
8 if (it) o = it;
9 var i = 0;
10
11 var F = function F() {};
12
13 return {
14 s: F,
15 n: function n() {
16 if (i >= o.length) return {
17 done: true
18 };
19 return {
20 done: false,
21 value: o[i++]
22 };
23 },
24 e: function e(_e) {
25 throw _e;
26 },
27 f: F
28 };
29 }
30
31 throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
32 }
33
34 var normalCompletion = true,
35 didErr = false,
36 err;
37 return {
38 s: function s() {
39 it = it.call(o);
40 },
41 n: function n() {
42 var step = it.next();
43 normalCompletion = step.done;
44 return step;
45 },
46 e: function e(_e2) {
47 didErr = true;
48 err = _e2;
49 },
50 f: function f() {
51 try {
52 if (!normalCompletion && it["return"] != null) it["return"]();
53 } finally {
54 if (didErr) throw err;
55 }
56 }
57 };
58}
59
60module.exports = _createForOfIteratorHelper;
61module.exports["default"] = module.exports, module.exports.__esModule = true;
Note: See TracBrowser for help on using the repository browser.