JsCommunity / JsCommunity/promise-toolbox
Implement map()
Open
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
iterablepromise to be resolved - execute
mapperon an entry ASAP - support a
concurrencyoption defaulting toInfinity
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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