Skip to content

mapValues

Map over all the keys to create a new object.

Usage

const a = { a: 1, b: 2, c: 3 };
mapValues(a, (value, key) => value * 2); // => { a: 2, b: 4, c: 6 }

Installation

Terminal window
npx atmx add helper map-values