Skip to content

v1.1.0

Latest

Choose a tag to compare

@mauro-d mauro-d released this 16 Aug 20:17

Counting from a CommonJS project no longer needs a dynamic import: the package
answers require() as well, on the versions of Node that load ESM from it.

Added

  • A CommonJS project can require('faircount'). There is no CommonJS build: the
    exports map answers the require condition with the same ESM file, which Node
    reads from require() on the versions below.

Changed

  • Requires Node ^20.19.0 || >=22.12.0, the versions that load ESM from
    require() without a flag. A single floor would have promised 22.0 through
    22.11, where the feature sits behind a flag. Below the range import still
    works, but it is no longer covered.

Fixed

  • A fractional seed is refused instead of seeding the run of its floor: 1.5
    and 1 produced the same sequence, while the README and the types promised an
    integer.

The README now compares faircount with HyperLogLog, says that two estimators
never combine into one count, and gives what the sample weighs in bytes.