Clone

Clone

Methods for cloning JavaScript objects.

Constructor

new Clone()

Methods

(static) simple(original) → {object}

Deep-clone a "simple" object: one which can be fully expressed with JSON. Non-JSON values, such as functions, will be stripped from the clone.

Parameters:
Name Type Description
original object

the object to be cloned.

Returns:

a deep clone of the original object.

Type
object