Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Universal helpers for all iterable data structures #37

Open
17 tasks
KiraLT opened this issue Sep 7, 2021 · 0 comments · May be fixed by #38
Open
17 tasks

Universal helpers for all iterable data structures #37

KiraLT opened this issue Sep 7, 2021 · 0 comments · May be fixed by #38
Assignees
Labels
enhancement New feature or request

Comments

@KiraLT
Copy link
Owner

KiraLT commented Sep 7, 2021

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
@KiraLT KiraLT added the enhancement New feature or request label Sep 7, 2021
@KiraLT KiraLT self-assigned this Sep 7, 2021
@KiraLT KiraLT linked a pull request Sep 7, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant