Creates a deep copy of the value which may contain (nested) Arrays and Objects, Numbers, Strings, Booleans and Dates. Functions are not copied, but assigned by their reference.
Array
Object
Number
String
Boolean
Date
Function
var objects = [{}, {}, {}]; var objectsClone = clone(objects); objects[0] === objectsClone[0]; //=> false
The value to clone
A copy of a value.
Generated using TypeDoc
Creates a deep copy of the value which may contain (nested)
Array
s andObject
s,Number
s,String
s,Boolean
s andDate
s.Function
s are not copied, but assigned by their reference.