Edit this page

up.util up.util.merge(...sources)
JavaScript function

Creates a new object by merging together the properties from the given objects.

Source values that are null or undefined are ignored.

Example

let a = { a: '1', b: '2' }
let b = { b: '3', c: '4' }
up.util.merge(a, b) // result: { a: '1', b: '3', c: '4' }

Parameters

...sources
required

The objects to merge.

Sources that are null or undefined are ignored.

Array<Object|null|undefined>

Return value

A new object with all merged properties.