NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3007 most downloaded on npm
A very fast static 2D index for points based on kd-tree.
Last release 4 months ago
19 May 2026
Release timing varies
gaps range from 3 months to 4.6 years
Most releases are documented
notes for 8 of 9 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
9 releases · first in 2016
Improve within and range performance (use a static module-level depth stack instead of allocating on every call).
within and range performance (use a static module-level depth stack instead of allocating on every call).withinInto(x, y, r, out) method that writes results into the provided array-like container, returning write count (allocation-free radius search). Useful in performance-sensitive applications where you search by radius millions of times (e.g. clustering).Make sure empty KDBush (with zero items) doesn't throw an error.
Make sure empty KDBush (with zero items) doesn't throw an error.
One column per quarter.
Fix NPM package missing index.js.
Fix NPM package missing index.js.
⚠️ A major rewrite of the library to make it more memory-efficient, serializable and similar in API to Flatbush. Breaks the API in the following way:
⚠️ A major rewrite of the library to make it more memory-efficient, serializable and similar in API to Flatbush. Breaks the API in the following way:
// old API
const index = new KDBush(points, p => p.x, p => p.y, 64, Uint32Array);
// new API
const index = new KDBush(points.length, 64, Uint32Array);
for (const {x, y} of points) index.add(x, y);
index.finish();
The new API is more verbose, but it allows creating an index without requiring to store coordinates in some intermediate point array, allowing more efficient memory use, and allows transferring (or saving to a binary file) and recreating an index from a single array buffer:
// instantly transfer the index from a worker to the main thread
postMessage(index.data, [index.data]);
// reconstruct the index from a raw array buffer
const index = Flatbush.from(e.data);
⚠️ Also breaking in this version:
⚠️ Breaking: Changed the API from kdbush(...) to new KDBush(...).
kdbush(...) to new KDBush(...).module consumers. Browser/Node builds are still transpiled to ES5.Fix Unpkg and JSDelivr configurations.
Fix Unpkg and JSDelivr configurations.
Expose KDBush as a proper ES module:
Expose KDBush as a proper ES module:
import kdbush from 'kdbush';
Moved tape from dependencies to devDependencies.
tape from dependencies to devDependencies.Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →