Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 432 Bytes

clone.md

File metadata and controls

15 lines (11 loc) · 432 Bytes

cmd.clone

name return value description
clone [mixed, ...] Clone any JavaScript variable not containing a circular reference.

The following example clones an object:

var answer = {data: 42};
var cloned = cmd.clone.raw(answer); // raw returns non-wrapped first response

[cloned === answer, cloned.data === answer.data];
// [false, true]