Skip to content
This repository was archived by the owner on Feb 9, 2022. It is now read-only.
This repository was archived by the owner on Feb 9, 2022. It is now read-only.

Add function to build object from [k, v] #34

@legomind

Description

@legomind

Basically the reverse of wu.entries

wu([
  ['keyA', 'a'],
  ['keyB', 'b'],
]).reduce((x, [ yx, yy ]) => ({ ...x, ...{ [yx]: yy } }), {})
// Outputs

{
 keyA: 'a',
 keyB: 'b',
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions