The clone() method returns a clone of the object (only data fields, not function).
var obj = {a: 1}; var clone = Mint.utils.clone(obj);
object that is clone of the passed object.
var value = { a: { b: 1 } }; var clone = Mint.utils.clone(); // { a: { b: 1 } } value = { a: { b: 1, foo: function(){} }, c: "lorem" }; clone = Mint.utils.clone(); // { a: { b: 1 }, c: "lorem" } value = "Lorem"; clone = Mint.utils.clone(); // "Lorem"
There was an error while loading. Please reload this page.
Home
Setup & Dependencies
Browsers support
Tests
Mint.utils functions
LICENSE