size += JSON.stringify(value).length; ^ TypeError: Cannot read property 'length' of undefined
size += JSON.stringify(value).length;
^
TypeError: Cannot read property 'length' of undefined