* Helper that recursively merges two data objects together.
(to, from)
| 1643 | */ |
| 1644 | |
| 1645 | function mergeData(to, from) { |
| 1646 | var key, toVal, fromVal; |
| 1647 | for (key in from) { |
| 1648 | toVal = to[key]; |
| 1649 | fromVal = from[key]; |
| 1650 | if (!hasOwn(to, key)) { |
| 1651 | set(to, key, fromVal); |
| 1652 | } else if (isObject(toVal) && isObject(fromVal)) { |
| 1653 | mergeData(toVal, fromVal); |
| 1654 | } |
| 1655 | } |
| 1656 | return to; |
| 1657 | } |
| 1658 | |
| 1659 | /** |
| 1660 | * Data |