1 LOC
GitHub 0★
Categories
Array
Date Time
DOM
Function
Math
Misc
Number
Object
Random
String
Validator
Ad
Shallow copy an object
JavaScript version
const
shallowCopy
=
obj
=>
Object
.
assign
(
{
}
,
obj
)
;
// or
const
shallowCopy
=
obj
=>
{
...
obj
}
;
Remove all null and undefined properties from an object
Sort an object by its properties