clone

external fun clone(obj: JsAny, deep: Boolean? = definedExternally): JsAny(source)

Clones an object, returning a new object containing the same properties.

Return

The cloned object.

Parameters

object

The object to clone.

deep

If true, all properties will be deep cloned recursively. Default value - false

See also