Skip to content

mapEntries

Map over all the keys to create a new object.

Usage

const a = { a: 1, b: 2, c: 3 };
mapEntries(a, (key, value) => [value, key]); // => { 1: 'a', 2: 'b', 3: 'c' }

Installation

Terminal window
npx atmx add helper map-entries