Skip to content

Implement iteration protocol in TrainrunIterator #883

@emersion

Description

@emersion

See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols

This would allow for a more natural iteration.

Before:

while (iterator.hasNext()) {
  const pair = iterator.next();
  // …
}

After:

for (const pair of iterator) {
  // …
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:servicesServices, helpers, utils and i18n ("logical" stuff)code-qualityTechnical enhancementsgood-first-issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions