Describe the issue
The clone function converts all Map keys to strings when cloning a Map.
Consider this case:
const m = new Map();
m.set('a', 1);
m.set(10, 'b');
m.set({ prop: 'val' }, 'c');
const c = clone(m);
console.log(c);
Expected Behavior
Map(3) { 'a' => 1, 10 => 'b', { prop: 'val' } => 'c' }
Actual Behavior
Map(3) { 'a' => 1, '10' => 'b', '[object Object]' => 'c' }
Describe the issue
The
clonefunction converts allMapkeys to strings when cloning aMap.Consider this case:
Expected Behavior
Actual Behavior