Skip to content

Map should only produce array; add mapValues and mapKeys #1157

@megawac

Description

@megawac

There was another issue/pr? for this I made sometime last year but currently map can produce either an object or array because of this line:

https://github.com/caolan/async/blob/master/lib/internal/map.js#L11

I would prefer we follow underscore/lodash lead and produce only arrays from map and then add mapValues and mapKeys for mapping objects (#1133).

This is one of the last changes I want to get into v2. Thoughts @aearly

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions