Function
callOnce
(self, resolveFn, rejectFn)
Source from the content-addressed store, hash-verified
| 14667 | function qFactory(nextTick, exceptionHandler) { |
| 14668 | var $qMinErr = minErr('$q', TypeError); |
| 14669 | function callOnce(self, resolveFn, rejectFn) { |
| 14670 | var called = false; |
| 14671 | function wrap(fn) { |
| 14672 | return function(value) { |
| 14673 | if (called) return; |
| 14674 | called = true; |
| 14675 | fn.call(self, value); |
| 14676 | }; |
| 14677 | } |
| 14678 | |
| 14679 | return [wrap(resolveFn), wrap(rejectFn)]; |
| 14680 | } |
| 14681 | |
| 14682 | /** |
| 14683 | * @ngdoc method |
Tested by
no test coverage detected