* Creates a function that invokes two functions and merges their return values. * * @param {function} one Function to invoke first. * @param {function} two Function to invoke second. * @return {function} Function that invokes the two argument functions. * @private
(one, two)
| 962 | * @private |
| 963 | */ |
| 964 | function createMergedResultFunction(one, two) { |
| 965 | return function mergedResult() { |
| 966 | var a = one.apply(this, arguments); |
| 967 | var b = two.apply(this, arguments); |
| 968 | if (a == null) { |
| 969 | return b; |
| 970 | } else if (b == null) { |
| 971 | return a; |
| 972 | } |
| 973 | var c = {}; |
| 974 | mergeIntoWithNoDuplicateKeys(c, a); |
| 975 | mergeIntoWithNoDuplicateKeys(c, b); |
| 976 | return c; |
| 977 | }; |
| 978 | } |
| 979 | |
| 980 | /** |
| 981 | * Creates a function that invokes two functions and ignores their return vales. |
no test coverage detected