1 | var _curry2 =
|
2 | /*#__PURE__*/
|
3 | require("./internal/_curry2");
|
4 |
|
5 | var mergeDeepWithKey =
|
6 | /*#__PURE__*/
|
7 | require("./mergeDeepWithKey");
|
8 | /**
|
9 | * Creates a new object with the own properties of the first object merged with
|
10 | * the own properties of the second object. If a key exists in both objects:
|
11 | * - and both values are objects, the two values will be recursively merged
|
12 | * - otherwise the value from the first object will be used.
|
13 | *
|
14 | * @func
|
15 | * @memberOf R
|
16 | * @since v0.24.0
|
17 | * @category Object
|
18 | * @sig {a} -> {a} -> {a}
|
19 | * @param {Object} lObj
|
20 | * @param {Object} rObj
|
21 | * @return {Object}
|
22 | * @see R.merge, R.mergeDeepRight, R.mergeDeepWith, R.mergeDeepWithKey
|
23 | * @example
|
24 | *
|
25 | * R.mergeDeepLeft({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }},
|
26 | * { age: 40, contact: { email: 'baa@example.com' }});
|
27 | * //=> { name: 'fred', age: 10, contact: { email: 'moo@example.com' }}
|
28 | */
|
29 |
|
30 |
|
31 | var mergeDeepLeft =
|
32 | /*#__PURE__*/
|
33 | _curry2(function mergeDeepLeft(lObj, rObj) {
|
34 | return mergeDeepWithKey(function (k, lVal, rVal) {
|
35 | return lVal;
|
36 | }, lObj, rObj);
|
37 | });
|
38 |
|
39 | module.exports = mergeDeepLeft; |
\ | No newline at end of file |