Inputs can be undefined, and if so, the default is returned.
Default object type.
Default values (if not specified in inputs).
Optional
inputs: undefinedOverriding values (changes to make).
Optional
recursive: booleanOptional. Whether to merge the object recursively. Default false.
Resulting object with all the defaults
and inputs
keys with
either default values or input values, as appropriate.
Passing recursive
as false means that the input type must be a Partial
(not RecursivePartial).
Optional
recursive: falsePassing recursive
as true means that the input type may actually be a
RecursivePartial.
Universal overload.
Optional
inputs: IOptional
recursive: boolean
Returns an updated version of
defaults
merged with the contents ofinputs
.Useful for parsing objects passed to functions with extra, optional options. Preserves all input properties.
Overloaded for better typing dependent on recursion.
Since
0.1.0