Skip to content

Releases: tristanls/k-bucket

v5.1.0

05 Feb 04:40
Compare
Choose a tag to compare

Added toIterable(). (#52)
Removed devDependency buffer-equals.
Updated dependencies.
Updated code style to standard@16.

v5.0.0

28 Aug 23:22
Compare
Choose a tag to compare

Updated implementation to ES6.
KBucket.prototype._determineNode uses bitshift (#41)

v4.0.1

12 May 19:52
Compare
Choose a tag to compare

Faster closest(). (#47)
Updated dependencies.

v4.0.0

06 Mar 23:57
Compare
Choose a tag to compare

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

04 Dec 17:05
Compare
Choose a tag to compare

When calculating closest nodes, no need to sort and slice everything all the time, it can be done once at the end. (#44)

v3.3.0

21 Aug 16:55
Compare
Choose a tag to compare

Added metadata property to k-bucket so that users can safely store satellite data associated with the bucket. (#43)

v3.2.1

21 Aug 23:35
Compare
Choose a tag to compare

Removed stray console.log.

v3.2.0

21 Aug 16:46
Compare
Choose a tag to compare

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.

v3.1.0

15 Aug 17:16
Compare
Choose a tag to compare

Custom distance function can be provided via KBucket options: (#37)
Exposed KBucket.arbiter for a more consistent API

v3.0.3

15 Aug 17:14
Compare
Choose a tag to compare

Reduced heap usage by removing recursion from KBucket: (#35)

Reported problems:

This release changed the internal implementation of closest(id, n) which may impact code that does not provide the required n parameter. See #38. Upgrading to v3.2.0 resolves this problem.