Skip to content

Universal helpers for all iterable data structures #37

@KiraLT

Description

@KiraLT

Instead of having different functions for each data structure (e. g. mapArray, mapRecord, asyncMap...), it would be helpful to have one function which could support all iterable data structures (in short, just one map).

Most data structures have Symbol.iterator, but maybe it is a good idea to avoid using it to increase browser support.

Following iterables should be supported:

Suggested iterable functions:

  • map
  • filter
  • flatMap
  • reduce
  • indexBy
  • toArray

Suggested additional helpers:

  • isIterator
  • isAsyncIterator
  • toIterator
  • toAsyncIterator

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions