Skip to content

Rename d3.scan to d3.leastIndex; add d3.least. #107

@mbostock

Description

@mbostock

I find d3.scan a little awkward. It feels like d3.min, but instead of an accessor, it takes a comparator, and instead of returning a value, it returns an index. This makes me wonder if we should have a method that’s like d3.scan, but that returns the least value rather than the least index.

Also, “scan” is a very generic name.

So, I propose deprecating d3.scan, and renaming it to d3.leastIndex. And introducing a new method d3.least that returns the least value according to the specified comparator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions