JsCommunity / JsCommunity/promise-toolbox

Implement map()

Open
#3 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
10
Forks
1
PR merge metrics
No merged PRs in 30d

Description

iterable::map(mapper, [ opts ]).then((collection) => {
  // Like iterable::all(), collection is an object if iterable
  // was a plain object, a map otherwise.
})
  • wait for the iterable promise to be resolved
  • execute mapper on an entry ASAP
  • support a concurrency option defaulting to Infinity

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing iterable::all() implementation and the promise-resolution entry point. Implement iterable::map() so it waits for the iterable, invokes the mapper as entries become available, and honors the concurrency option with Infinity as the default. Done means the resolved collection preserves the input's object or map form and the documented behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.