UNPKG
@n3okill/utils
Version:
latest (2.0.4)
2.0.4
2.0.3
2.0.0
1.1.1
1.1.0
1.0.5
1.0.4
1.0.2
1.0.1
Many javascript helpers
github.com/n3okill/utils
n3okill/utils
@n3okill/utils
/
dist
/
mjs
/
object
/
toMap.js
14 lines
•
312 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/** * Transform object to Map *
@param
obj The object to transform *
@returns
Map from the object */
export
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