@smart-link/auto-config
Advanced tools
Comparing version 0.6.6 to 0.6.7
@@ -181,7 +181,7 @@ "use strict"; | ||
config.syncLoad = /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { | ||
config.syncLoad = /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() { | ||
var syncLoaders, syncArray; | ||
return _regenerator["default"].wrap(function _callee2$(_context2) { | ||
return _regenerator["default"].wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
@@ -193,32 +193,17 @@ syncLoaders = []; | ||
if (syncLoader) { | ||
syncLoaders.push( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() { | ||
var data; | ||
return _regenerator["default"].wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_context.next = 2; | ||
return syncLoader(); | ||
case 2: | ||
data = _context.sent; | ||
return _context.abrupt("return", { | ||
key: key, | ||
data: data | ||
}); | ||
case 4: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee); | ||
}))); | ||
syncLoaders.push(new Promise(function (resolve) { | ||
syncLoader().then(function (data) { | ||
return resolve({ | ||
key: key, | ||
data: data | ||
}); | ||
}); | ||
})); | ||
} | ||
}); | ||
_context2.next = 4; | ||
_context.next = 4; | ||
return Promise.all(syncLoaders); | ||
case 4: | ||
syncArray = _context2.sent; | ||
syncArray = _context.sent; | ||
syncArray.forEach(function (key, data) { | ||
@@ -230,6 +215,6 @@ config[key] = data; | ||
case "end": | ||
return _context2.stop(); | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee2); | ||
}, _callee); | ||
})); | ||
@@ -236,0 +221,0 @@ return config; |
@@ -165,7 +165,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
config.syncLoad = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() { | ||
config.syncLoad = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() { | ||
var syncLoaders, syncArray; | ||
return _regeneratorRuntime.wrap(function _callee2$(_context2) { | ||
return _regeneratorRuntime.wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
@@ -177,32 +177,17 @@ syncLoaders = []; | ||
if (syncLoader) { | ||
syncLoaders.push( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() { | ||
var data; | ||
return _regeneratorRuntime.wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_context.next = 2; | ||
return syncLoader(); | ||
case 2: | ||
data = _context.sent; | ||
return _context.abrupt("return", { | ||
key: key, | ||
data: data | ||
}); | ||
case 4: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee); | ||
}))); | ||
syncLoaders.push(new Promise(function (resolve) { | ||
syncLoader().then(function (data) { | ||
return resolve({ | ||
key: key, | ||
data: data | ||
}); | ||
}); | ||
})); | ||
} | ||
}); | ||
_context2.next = 4; | ||
_context.next = 4; | ||
return Promise.all(syncLoaders); | ||
case 4: | ||
syncArray = _context2.sent; | ||
syncArray = _context.sent; | ||
syncArray.forEach(function (key, data) { | ||
@@ -214,6 +199,6 @@ config[key] = data; | ||
case "end": | ||
return _context2.stop(); | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee2); | ||
}, _callee); | ||
})); | ||
@@ -220,0 +205,0 @@ return config; |
@@ -1,2 +0,2 @@ | ||
/** @license SmartLink-UI v0.6.6 | ||
/** @license SmartLink-UI v0.6.7 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -1,2 +0,2 @@ | ||
/** @license SmartLink-UI v0.6.6 | ||
/** @license SmartLink-UI v0.6.7 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
{ | ||
"name": "@smart-link/auto-config", | ||
"version": "0.6.6", | ||
"version": "0.6.7", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
24967
580