MCPcopy Create free account
hub / github.com/JacksonTian/fks / ref

Function ref

fks_chart/bower_components/angular/angular.js:11762–11773  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

11760
11761
11762 var ref = function(value) {
11763 if (isPromiseLike(value)) return value;
11764 return {
11765 then: function(callback) {
11766 var result = defer();
11767 nextTick(function() {
11768 result.resolve(callback(value));
11769 });
11770 return result.promise;
11771 }
11772 };
11773 };
11774
11775
11776 /**

Callers 3

deferFunction · 0.85
whenFunction · 0.85
allFunction · 0.85

Calls 3

isPromiseLikeFunction · 0.85
deferFunction · 0.85
callbackFunction · 0.85

Tested by

no test coverage detected