keycloak_theme/lib/tools/allPropertiesValuesToUndefined.js

29 lines
1011 B
JavaScript

"use strict";
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.allPropertiesValuesToUndefined = void 0;
require("minimal-polyfills/Object.fromEntries");
function allPropertiesValuesToUndefined(obj) {
return Object.fromEntries(Object.entries(obj)
.map(function (_a) {
var _b = __read(_a, 1), key = _b[0];
return [key, undefined];
}));
}
exports.allPropertiesValuesToUndefined = allPropertiesValuesToUndefined;
//# sourceMappingURL=allPropertiesValuesToUndefined.js.map