(a, b)
| 580 | } |
| 581 | |
| 582 | function deepMerge(a, b) { |
| 583 | const result = assign({}, a); |
| 584 | |
| 585 | for (const key in b) { |
| 586 | const val = b[key]; |
| 587 | |
| 588 | if (isObject(val) && isObject(a[key])) { |
| 589 | result[key] = deepMerge(a[key], val); |
| 590 | } else { |
| 591 | result[key] = val; |
| 592 | } |
| 593 | } |
| 594 | |
| 595 | return result; |
| 596 | } |
| 597 | |
| 598 | function shallowMerge(a, b) { |
| 599 | return assign(assign({}, a), b); |
no test coverage detected