@n3okill/utils
Version:
Many javascript helpers
17 lines • 405 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.toMap = toMap;
/**
* Transform object to Map
* @param obj The object to transform
* @returns Map from the object
*/
function toMap(obj = {}) {
const map = new Map();
const o = obj;
Object.keys(o).forEach((key) => {
map.set(key, o[key]);
});
return map;
}
//# sourceMappingURL=toMap.js.map
;