utilities/merge
Utility to deep merge objects
Parameters
Parameter |
Type |
Attributes |
Description |
---|---|---|---|
target |
Object |
Required |
Object to merge onto |
values |
Object |
Required |
Object to import. |
options.regxp |
Boolean |
Optional |
If the value key is a pattern, merge into all matching target keys. The value will be templated with capture groups for each matched key. |
options.delete |
Boolean |
Optional |
Delete keys when merging in null value. |
options.foldcase |
Boolean |
Optional |
Merges keys with case-insensitive match. New keys are added as is. |
returns
Type |
Description |
---|---|
* |
Transformed object |