Not able to calculate memory for Map object #1
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
andyburke/js-sizeof#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
var myMap = new Map();
for(var i=0 ; i<10000;i++)
{
myMap.set(name+i, "value associated with 'a string'");
}
console.log(sizeof(myMap));
it is showing size as 0.
Can someone help ?
The library was created to work on basic js types. There probably needs to be special case handling for the newer Map object. I would welcome a pull request adding functionality to calculate the size of Map objects.