coolant
Version:
The modular build radiator
12 lines (11 loc) • 414 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
exports.toObjectMap = function (objects, keySelector) {
return objects
.map(function (object) {
var _a;
return (_a = {}, _a[keySelector(object)] = object, _a);
})
.reduce(function (acc, next) { return (tslib_1.__assign(tslib_1.__assign({}, acc), next)); }, {});
};