Releases: tristanls/k-bucket
v5.1.0
v5.0.0
v4.0.1
v4.0.0
Internal implementation now expects Uint8Array
instead of Buffer
for node ids. (#45)
Since Buffer
extends Uint8Array
, code using Buffer
for node ids should continue to work.
kBucket.add()
is faster in benchmark while perhaps slightly increasing heap usage.
Browsers no longer need Buffer
polyfill to use k-bucket
.
v3.3.1
v3.3.0
v3.2.1
v3.2.0
The implementation of the API did not enforce the contract for closest(id, n)
method call when n
(required) is not provided. Some consumers of the library used closest(id)
, without specifying n
. v3.0.3
introduced a change in internal implementation that, while maintaining behavior with n
specified, changed the behavior when n
was omitted. This release reverts the observed behavior of closest
, when n
is omitted, to be the same as prior to v3.0.3
. The API is now updated, and n
in closest(id [, n = Infinity])
is optional and set to Infinity
by default.