From 870334be3f58507c05bfc72f3edbe5db10af4caf Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 20:06:16 +0400 Subject: remove dojo uncompressed files --- lib/dojo/when.js.uncompressed.js | 55 ---------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 lib/dojo/when.js.uncompressed.js (limited to 'lib/dojo/when.js.uncompressed.js') diff --git a/lib/dojo/when.js.uncompressed.js b/lib/dojo/when.js.uncompressed.js deleted file mode 100644 index 7c7764250..000000000 --- a/lib/dojo/when.js.uncompressed.js +++ /dev/null @@ -1,55 +0,0 @@ -define("dojo/when", [ - "./Deferred", - "./promise/Promise" -], function(Deferred, Promise){ - "use strict"; - - // module: - // dojo/when - - return function when(valueOrPromise, callback, errback, progback){ - // summary: - // Transparently applies callbacks to values and/or promises. - // description: - // Accepts promises but also transparently handles non-promises. If no - // callbacks are provided returns a promise, regardless of the initial - // value. Foreign promises are converted. - // - // If callbacks are provided and the initial value is not a promise, - // the callback is executed immediately with no error handling. Returns - // a promise if the initial value is a promise, or the result of the - // callback otherwise. - // valueOrPromise: - // Either a regular value or an object with a `then()` method that - // follows the Promises/A specification. - // callback: Function? - // Callback to be invoked when the promise is resolved, or a non-promise - // is received. - // errback: Function? - // Callback to be invoked when the promise is rejected. - // progback: Function? - // Callback to be invoked when the promise emits a progress update. - // returns: dojo/promise/Promise - // Promise, or if a callback is provided, the result of the callback. - - var receivedPromise = valueOrPromise && typeof valueOrPromise.then === "function"; - var nativePromise = receivedPromise && valueOrPromise instanceof Promise; - - if(!receivedPromise){ - if(callback){ - return callback(valueOrPromise); - }else{ - return new Deferred().resolve(valueOrPromise); - } - }else if(!nativePromise){ - var deferred = new Deferred(valueOrPromise.cancel); - valueOrPromise.then(deferred.resolve, deferred.reject, deferred.progress); - valueOrPromise = deferred.promise; - } - - if(callback || errback || progback){ - return valueOrPromise.then(callback, errback, progback); - } - return valueOrPromise; - }; -}); -- cgit v1.2.3