function sap/base/util/deepExtend

Visiblity: public
Available since: N/A
Module: sap/base/util/deepExtend
Application Component:

Performs object extension by merging source objects into a target object. Copies are always deep.

If during merging a key in the target object exists it is overwritten with the source object's value. Usage is the same as jQuery.extend(true, ...). Values that are undefined are ignored.

For shallow copies, you may use sap/base/util/extend or Object.assign, but note that Object.assign only copies enumerable and own properties and doesn't copy properties on the prototype and non-enumerable properties. Also, values that are undefined are NOT ignored.


Parameters Overview

Param Type Default Value Description
target object The object that will receive new properties
source? object One or more objects which get merged into the target object

Methods Overview

Method Description