• Creates a (deep) clone of the object

    Example

    const a = { foo: 'bar', obj: { a: 1, b: 2 } };
    const b = clone(a, true); // a !== b, a.obj !== b.obj

    Type Parameters

    • Value extends Record<string, unknown>

    Parameters

    • obj: Value
    • Optional deep: boolean = false

    Returns Value

Generated using TypeDoc