Function
callOnce
(self, resolveFn, rejectFn)
Source from the content-addressed store, hash-verified
| 14492 | function qFactory(nextTick, exceptionHandler) { |
| 14493 | var $qMinErr = minErr('$q', TypeError); |
| 14494 | function callOnce(self, resolveFn, rejectFn) { |
| 14495 | var called = false; |
| 14496 | function wrap(fn) { |
| 14497 | return function(value) { |
| 14498 | if (called) return; |
| 14499 | called = true; |
| 14500 | fn.call(self, value); |
| 14501 | }; |
| 14502 | } |
| 14503 | |
| 14504 | return [wrap(resolveFn), wrap(rejectFn)]; |
| 14505 | } |
| 14506 | |
| 14507 | /** |
| 14508 | * @ngdoc method |
Tested by
no test coverage detected