(source, destination)
| 887 | return copyElement(source); |
| 888 | |
| 889 | function copyRecurse(source, destination) { |
| 890 | var h = destination.$$hashKey; |
| 891 | var result, key; |
| 892 | if (isArray(source)) { |
| 893 | for (var i = 0, ii = source.length; i < ii; i++) { |
| 894 | destination.push(copyElement(source[i])); |
| 895 | } |
| 896 | } else if (isBlankObject(source)) { |
| 897 | // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty |
| 898 | for (key in source) { |
| 899 | destination[key] = copyElement(source[key]); |
| 900 | } |
| 901 | } else if (source && typeof source.hasOwnProperty === 'function') { |
| 902 | // Slow path, which must rely on hasOwnProperty |
| 903 | for (key in source) { |
| 904 | if (source.hasOwnProperty(key)) { |
| 905 | destination[key] = copyElement(source[key]); |
| 906 | } |
| 907 | } |
| 908 | } else { |
| 909 | // Slowest path --- hasOwnProperty can't be called as a method |
| 910 | for (key in source) { |
| 911 | if (hasOwnProperty.call(source, key)) { |
| 912 | destination[key] = copyElement(source[key]); |
| 913 | } |
| 914 | } |
| 915 | } |
| 916 | setHashKey(destination, h); |
| 917 | return destination; |
| 918 | } |
| 919 | |
| 920 | function copyElement(source) { |
| 921 | // Simple values |
no test coverage detected