ionic-native-http-connection-backend
Version:
A solution to CORS problem with Ionic and WKWebView
19 lines • 755 B
JavaScript
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
export var collectionToObject = function (collection) {
return collection.keys().reduce(function (result, key) {
var _a;
var allValues = collection.getAll(key);
return __assign(__assign({}, result), (_a = {}, _a[key] = allValues.length > 1 ? allValues : collection.get(key), _a));
}, {});
};
//# sourceMappingURL=collection-to-object.js.map