Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

drop methods don't pass value to Iterator while dropping #113

@avandolder

Description

@avandolder

i'm a bit confused why this needs a lastValue instead of calling with the parameter absent. why would the next method need to have arguments.length be 0 for the dropped cases, but 1 for the kept ones?

(in other words, why aren't they all passing undefined to IteratorStep?)

Originally posted by @ljharb in #112

The current behaviour of the drop methods is observably different for dropped calls to IteratorStep/Next and non-dropped ones. It seems desirable to unify them; either pass through lastValue to the iterator on all steps, even the dropped ones, or don't pass it at all.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions