UNPKG

@n3okill/utils

Version:
17 lines 405 B
"use strict"; 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