Skip to content

Releases: miktam/sizeof

Fixed types

19 Jan 20:34
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.6.1...v2.6.4

Support for Function.

29 Jan 09:17
5dbd962
Compare
Choose a tag to compare

Support is added to calculate the string representation of a Function.

Support for Set, Map, BigInt

28 Jan 20:55
18e5d95
Compare
Choose a tag to compare

Added support for Map, Set, BigInt

v2.0.0 Different implementation for node.js and the browser

24 Jan 14:54
c8675b6
Compare
Choose a tag to compare

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

03 Apr 05:45
3ebad69
Compare
Choose a tag to compare

Added support for symbols: #43
Kudos to @aw-davidson !

Fixes object circular references

18 Feb 10:51
ccfee89
Compare
Choose a tag to compare

ES5 compatibility, security fixes

16 Oct 02:59
81557e3
Compare
Choose a tag to compare

ES5 compatibility, security fixes