Clones a data object

Use in your code Learn more
bit import tomlandau.simple-js/global/clone-data-object

Clones a data object.

Object properties will be copied, but functions won’t be duplicated.

cloneDataObject (original:*) : *

Argument

original: *

Returns

*

Test Summary

cloneDataObject should return undefined if original is undefinedPass
cloneDataObject should return a copy of the object with its first-level propertiesPass
cloneDataObject should return a deep copy of the object with its second-level propertiesPass