Skip to content

Add an option to use range as a generator function #49

@HatulaPro

Description

@HatulaPro

Sometimes you really only need the first item that matches your query, and getting the whole list just adds unnecessary work.

We could optimize this by adding a version of KDBush.range or KDBush.within that instead of returning an array with every single match, are implemented using generators

I'm happy to open a PR :)

Real world example:
maplibre/maplibre-gl-js#6192 (comment)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions