(source, destination)
| 913 | return copyElement(source); |
| 914 | |
| 915 | function copyRecurse(source, destination) { |
| 916 | var h = destination.$$hashKey; |
| 917 | var result, key; |
| 918 | if (isArray(source)) { |
| 919 | for (var i = 0, ii = source.length; i < ii; i++) { |
| 920 | destination.push(copyElement(source[i])); |
| 921 | } |
| 922 | } else if (isBlankObject(source)) { |
| 923 | // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty |
| 924 | for (key in source) { |
| 925 | destination[key] = copyElement(source[key]); |
| 926 | } |
| 927 | } else if (source && typeof source.hasOwnProperty === 'function') { |
| 928 | // Slow path, which must rely on hasOwnProperty |
| 929 | for (key in source) { |
| 930 | if (source.hasOwnProperty(key)) { |
| 931 | destination[key] = copyElement(source[key]); |
| 932 | } |
| 933 | } |
| 934 | } else { |
| 935 | // Slowest path --- hasOwnProperty can't be called as a method |
| 936 | for (key in source) { |
| 937 | if (hasOwnProperty.call(source, key)) { |
| 938 | destination[key] = copyElement(source[key]); |
| 939 | } |
| 940 | } |
| 941 | } |
| 942 | setHashKey(destination, h); |
| 943 | return destination; |
| 944 | } |
| 945 | |
| 946 | function copyElement(source) { |
| 947 | // Simple values |
no test coverage detected