Skip to content

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.

new SizeCalculator(options?): SizeCalculator

SizeCalculatorOptions = {}

SizeCalculator

aggregateSize(value): number

aggregateSize returns the recursive element count of the input value.

unknown

number

AggregateSizer.aggregateSize


version(): number

version returns the calculation version.

number