Options
All
  • Public
  • Public/Protected
  • All
Menu

Smartface Copy helper module

author

Alper Ozisik alper.ozisik@smartface.io

copyright

Smartface 2018

Index

Functions

Functions

default

  • default(source: any, destination?: any): any
  • Creates a deep high-performing copy of a variable

    function

    copy

    params

    {*} source

    params

    {*} [destination]

    example
    import copy from '@smartface/extension-utils/lib/copy';
    const src = {nested: {x: 4}}; //deep nested object
    const cpy = copy(src);

    console.log(src === cpy); //false
    console.log(src.nested === cpy.nested); //false
    example
    import copy from '@smartface/extension-utils/lib/copy';
    const src = {nested: {x: 4}}; //deep nested object
    const cpy;
    //targeting
    copy(src, cpy);

    Parameters

    • source: any
    • Optional destination: any

    Returns any

    copy of the source

Generated using TypeDoc