vtils

Home > utils > cloneDeepFast

cloneDeepFast() function

深克隆快速版。

Signature:

export declare function cloneDeepFast<T>(value: T, ignore?: (value: unknown) => boolean | undefined): T;

Parameters

Parameter Type Description
value T 要克隆的值
ignore (value: unknown) => boolean | undefined (Optional) 忽略的值

Returns:

T

返回克隆后的值

Example

cloneDeepFast({ x: [1] })
// => { x: [1] }