* 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)
| 4920 | * @private |
| 4921 | */ |
| 4922 | function createMergedResultFunction(one, two) { |
| 4923 | return function mergedResult() { |
| 4924 | var a = one.apply(this, arguments); |
| 4925 | var b = two.apply(this, arguments); |
| 4926 | if (a == null) { |
| 4927 | return b; |
| 4928 | } else if (b == null) { |
| 4929 | return a; |
| 4930 | } |
| 4931 | var c = {}; |
| 4932 | mergeIntoWithNoDuplicateKeys(c, a); |
| 4933 | mergeIntoWithNoDuplicateKeys(c, b); |
| 4934 | return c; |
| 4935 | }; |
| 4936 | } |
| 4937 | |
| 4938 | /** |
| 4939 | * Creates a function that invokes two functions and ignores their return vales. |
no test coverage detected
searching dependent graphs…