MCPcopy
hub / github.com/angular-ui/ui-router / ref

Function ref

test/angular/1.2/angular.js:11815–11826  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

11813
11814
11815 var ref = function(value) {
11816 if (isPromiseLike(value)) return value;
11817 return {
11818 then: function(callback) {
11819 var result = defer();
11820 nextTick(function() {
11821 result.resolve(callback(value));
11822 });
11823 return result.promise;
11824 }
11825 };
11826 };
11827
11828
11829 /**

Callers 3

deferFunction · 0.85
whenFunction · 0.85
allFunction · 0.85

Calls 4

isPromiseLikeFunction · 0.70
deferFunction · 0.70
callbackFunction · 0.70
nextTickFunction · 0.50

Tested by

no test coverage detected