Skip to content

v0.4.0

Choose a tag to compare

@mauro-d mauro-d released this 27 Jul 21:46
· 4 commits to main since this release

toJSON hands over an estimator's state as a plain object and the static
fromJSON rebuilds one from it, so a long count survives a restart. Both APIs
now take an AbortSignal. Every error the library raises about its own use
carries a code (CVM_INVALID_OPTION, CVM_INVALID_SOURCE,
CVM_INVALID_SNAPSHOT, CVM_UNSERIALIZABLE_VALUE), while an aborted signal
follows Node with ABORT_ERR.

keyFn is now typed to the values a Set dedups and JSON returns unchanged:
a string, number, boolean or null. TypeScript users passing an optional
field will see an error where a missing value used to be counted silently as
one distinct value.