Function
callOnce
(self, resolveFn, rejectFn)
Source from the content-addressed store, hash-verified
| 13243 | function qFactory(nextTick, exceptionHandler) { |
| 13244 | var $qMinErr = minErr('$q', TypeError); |
| 13245 | function callOnce(self, resolveFn, rejectFn) { |
| 13246 | var called = false; |
| 13247 | function wrap(fn) { |
| 13248 | return function(value) { |
| 13249 | if (called) return; |
| 13250 | called = true; |
| 13251 | fn.call(self, value); |
| 13252 | }; |
| 13253 | } |
| 13254 | |
| 13255 | return [wrap(resolveFn), wrap(rejectFn)]; |
| 13256 | } |
| 13257 | |
| 13258 | /** |
| 13259 | * @ngdoc method |
Tested by
no test coverage detected