MCPcopy Create free account
hub / github.com/node-modules/utility / map0

Function map0

benchmark/map.cjs:7–17  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

5const suite = new Benchmark.Suite();
6
7function map0(obj) {
8 const map = {};
9 if (!obj) {
10 return map;
11 }
12
13 for (const key in obj) {
14 map[key] = obj[key];
15 }
16 return map;
17}
18
19function map1(obj) {
20 const map = Object.create(null);

Callers 1

map.cjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…