Releases: miktam/sizeof
Releases · miktam/sizeof
Fixed types
What's Changed
- Bug/big int and other types in nested by @miktam in #89
- Explains error handling (eg circular structures) by @miktam in #92
- Update types by @carlo-quinonez in #94
New Contributors
- @carlo-quinonez made their first contribution in #94
Full Changelog: v2.6.1...v2.6.4
Support for Function.
Support is added to calculate the string representation of a Function.
Support for Set, Map, BigInt
Added support for Map, Set, BigInt
v2.0.0 Different implementation for node.js and the browser
This version uses two different implementations for Node and browser.
Node.js: The function uses the Buffer.from(objectToString) method to convert the string representation of the object to a buffer, and then it uses the byteLength property to obtain the size of the buffer in bytes.
Browser implementation uses a combination of recursion and a stack to iterate through all of its properties, adding up the number of bytes for each data type it encounters.
Included symbols support
Added support for symbols: #43
Kudos to @aw-davidson !
Fixes object circular references
Kudos to @jamesacres !
ES5 compatibility, security fixes
ES5 compatibility, security fixes