Home > doofinder > extend

extend() function

Merge the contents of two or more objects together into the first object.

Signature:

export declare function extend(...args: unknown[]): Record<string, any> | Array<any>;

Parameters

Parameter Type Description
args unknown[]  

Returns:

Record<string, any> | Array<any>

A copy of the provided object.

Remarks

Ported from jQuery.

Example

extend( [deep ], target, object1 [, objectN ] )