clone

clone

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

Parameters:
Name Type Argument Default Description
object Object The object to clone.
deep Boolean <optional>
false If true, all properties will be deep cloned recursively.
Source: