UNPKG
update-deep-copy
Version:
latest (0.4.1)
0.4.1
0.4.0
0.3.0
0.2.2
0.2.1
0.2.0
0.1.0
Deep copy and update object
github.com/70-10/update-deep-copy
70-10/update-deep-copy
update-deep-copy
/
example.js
7 lines
(4 loc)
•
169 B
JavaScript
View Raw
1
2
3
4
5
6
7
const
update
=
require
(
"."
);
const
object
= { a:
1
, b: { c:
"c"
, d: [
0
,
1
,
2
,
3
] } };
const
copy
=
update
(
object
, {
b
: {
d
: undefined,
e
:
"f"
} }); console.
log
(copy);