1 | var _objectAssign =
|
2 | /*#__PURE__*/
|
3 | require("./internal/_objectAssign");
|
4 |
|
5 | var _curry2 =
|
6 | /*#__PURE__*/
|
7 | require("./internal/_curry2");
|
8 | /**
|
9 | * Create 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 | * the value from the second object will be used.
|
12 | *
|
13 | * @func
|
14 | * @memberOf R
|
15 | * @since v0.1.0
|
16 | * @category Object
|
17 | * @sig {k: v} -> {k: v} -> {k: v}
|
18 | * @param {Object} l
|
19 | * @param {Object} r
|
20 | * @return {Object}
|
21 | * @see R.mergeRight, R.mergeDeepRight, R.mergeWith, R.mergeWithKey
|
22 | * @deprecated since v0.26.0
|
23 | * @example
|
24 | *
|
25 | * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 });
|
26 | * //=> { 'name': 'fred', 'age': 40 }
|
27 | *
|
28 | * const withDefaults = R.merge({x: 0, y: 0});
|
29 | * withDefaults({y: 2}); //=> {x: 0, y: 2}
|
30 | * @symb R.merge(a, b) = {...a, ...b}
|
31 | */
|
32 |
|
33 |
|
34 | var merge =
|
35 | /*#__PURE__*/
|
36 | _curry2(function merge(l, r) {
|
37 | return _objectAssign({}, l, r);
|
38 | });
|
39 |
|
40 | module.exports = merge; |
\ | No newline at end of file |