npm.io
9.13.0 • Published 5 years ago

@unction/mapkeyswithvaluekey

Licence
SEE LICENSE IN LICENSE
Version
9.13.0
Deps
4
Size
20 kB
Vulns
0
Weekly
0

@unction/mapKeysWithValueKey

Tests Stability Dependencies

MapperFunctionType<A, MapperFunctionType<B, C>> => Array | Set | Record<string | number | symbol, B> | Map<B, A> | string => Array | Set | Record<string | number | symbol, B> | Map<C, B> | string

Map over keys with the context of the value and key.

const attributes = {
  name: "Kurtis Rainbolt-Greene",
  createdAt: new Date()
}

mapKeys((value) => (key) => )(attributes)

Would return:

{
  name: "Kurtis Rainbolt-Greene",
  "created-at": new Date()
}

Keywords