UNPKG
@thinql/parse
Version:
latest (0.2.0)
0.2.0
Parse ThinQL queries to ASTs
github.com/mmiller42/thinql
mmiller42/thinql
@thinql/parse
/
src
/
lib
/
utils
/
mapValues.js
7 lines
(5 loc)
•
174 B
JavaScript
View Raw
1
2
3
4
5
6
7
const
mapValues
= (
object
, fn
) =>
Object
.
keys
(
object
).
reduce
(
(
result, key
) =>
{ result[key] =
fn
(
object
[key], key,
object
)
return
result }, {})
export
default
mapValues