Skip to content

Way to end eachMapping early? #389

@mheiber

Description

@mheiber

It doesn't look like there is a way to end eachMapping early.
We have some code that searches through the mappings for a 'bad' mapping. We want to exit the function early at that point, instead of continuing through all the other mappings.

Would you accept a PR to add this functionality? Could be implemented as:

  • a done callback
  • or return false to stop the iteration
  • or return END_ITERATION where END_ITERATION is defined as a special value {}. This has better backwards-compatibility than returning false.

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