Smartface Copy helper module
Alper Ozisik alper.ozisik@smartface.io
Smartface 2018
Creates a deep high-performing copy of a variable
copy
{*} source
{*} [destination]
import copy from '@smartface/extension-utils/lib/copy';const src = {nested: {x: 4}}; //deep nested objectconst cpy = copy(src);console.log(src === cpy); //falseconsole.log(src.nested === cpy.nested); //false
import copy from '@smartface/extension-utils/lib/copy';const src = {nested: {x: 4}}; //deep nested objectconst cpy;//targetingcopy(src, cpy);
copy of the source
Generated using TypeDoc
Smartface Copy helper module
Alper Ozisik alper.ozisik@smartface.io
Smartface 2018