0

I'm using "npm i object-sizeof" to find the size character in a map.

var sizeof = require('object-sizeof')

const map1 = new Map();

map1.set('a', 'alpha');
map1.set('b', 'beta');
map1.set('g', 'gamma');

console.log(sizeof(map1.get('a')));

But i'm unable to get the value of console.log(sizeof(map1); my aim is to get the size of character i.e key and value. Each character consist of 2 bytes.

kartik
  • 1
  • 1

0 Answers0