merge-deep-left

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
1 KB
Creates a new object with the own properties of the first object merged with the own properties of the second object.
1 contributor
Install merge-deep-left as a package?
Copied
npm i @bit/justin-capalbo.ramda.merge-deep-left
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
mergeDeepLeft (
lObj:Object,
rObj:Object
) : Object

Creates a new object with the own properties of the first object merged with the own properties of the second object. If a key exists in both objects:

  • and both values are objects, the two values will be recursively merged
  • otherwise the value from the first object will be used.
Example
R.mergeDeepLeft({ name: 'fred', age: 10, contact: { email: '[email protected]' }},
                     { age: 40, contact: { email: '[email protected]' }});
     //=> { name: 'fred', age: 10, contact: { email: '[email protected]' }}
Arguments
lObj: Object
rObj: Object
Returns
Object

Help and resources