UNPKG
imma
Version:
latest (0.0.1)
0.0.1
A collection of functions for dealing with native arrays and objects immutably
imma
/
lib
/
general
/
updateIn.js
7 lines
(5 loc)
•
195 B
JavaScript
View Raw
1
2
3
4
5
6
7
'use strict'
const
setIn =
require
(
'./setIn'
)
const
getIn =
require
(
'./getIn'
)
const
updateIn =
module
.
exports
=
(
iterable, keys, fn
) =>
setIn
(iterable, keys,
fn
(
getIn
(iterable, keys)))