Options
All
  • Public
  • Public/Protected
  • All
Menu

Module clone

V8 Functions

clone

  • clone<Type>(value: Type, setPrototype?: boolean): Type
  • name

    clone

    description

    Deep clone object. Note: don't use on objects containing Functions.

    summary

    import { clone } from '@corefunc/v8/clone/clone';

    throws

    {Error}

    since

    0.0.1

    Type parameters

    • Type: unknown

    Parameters

    • value: Type

      Object to be deep cloned.

    • setPrototype: boolean = true

    Returns Type

cloneMarshalling

  • cloneMarshalling<Type>(value: Type): Type
  • name

    cloneMarshalling

    description

    Deep clone object and sets the prototype. Note: don't use on objects containing Functions.

    summary

    import { clone } from '@corefunc/v8/clone/clone-marshalling';

    throws

    {Error}

    since

    0.1.0

    Type parameters

    • Type: unknown

    Parameters

    • value: Type

      Object to be deep cloned.

    Returns Type

cloneShallow

  • cloneShallow<Type>(value: Type): Type
  • name

    cloneShallow

    description

    Deep clone any object to plain object.

    summary

    import { clone } from '@corefunc/v8/clone/clone-shallow';

    throws

    {Error}

    since

    0.1.0

    Type parameters

    • Type: unknown

    Parameters

    • value: Type

      Object to be deep cloned.

    Returns Type

Generated using TypeDoc