DeepAssign

shared/deepAssign. DeepAssign

It allows for deep merge (and copy) of objects and arrays using native spread syntax.

This class exists just to scope the different functionalities and options needed for DeepAssign#assign method to work.

Constructor

new DeepAssign(options)

Source:
Parameters:
Name Type Description
options Partial.<DeepAssignOptions>

Custom options for how DeepAssign#assign it's going to work.

Throws:

If options.arrayMode is not a valid DeepAssignArrayMode.

Type
Error

Members

options :Readonly.<DeepAssignOptions>

Source:

The options that define how DeepAssign#assign works.

Type:

Methods

assign(…targets) → {Object|Array}

Source:

Makes a deep merge of a list of objects and/or arrays.

Parameters:
Name Type Attributes Description
targets * <repeatable>

The objects to merge; if one of them is not an object nor an array, it will be ignored.

Returns:
Type
Object | Array