src code

class method SpahQL.DataHelper.deepClone

SpahQL.DataHelper.deepClone(obj) → Object

obj (Array, Object): The object to be cloned

Creates a deep clone of an object or array. All nested objects and arrays are also deep-cloned. Strings, booleans and numbers are returned as-is, because all in-place modifications to strings and numbers produce new object assignments anyway.