SizeCalculator
SizeCalculator calculates the recursive element size of values.
Values which exceed either the depth or the traversal limit report MAX_UINT32 rather than paying for an unbounded walk, so a hostile or cyclic input cannot stall the caller.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SizeCalculator(
options?):SizeCalculator
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”SizeCalculator
Methods
Section titled “Methods”aggregateSize()
Section titled “aggregateSize()”aggregateSize(
value):number
aggregateSize returns the recursive element count of the input value.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”number
Implementation of
Section titled “Implementation of”version()
Section titled “version()”version():
number
version returns the calculation version.
Returns
Section titled “Returns”number