Sha256: ebc9c7cfefddd03caa52c440de8d023d8adde469b738d908aa023c4fe3d09540

Contents?: true

Size: 941 Bytes

Versions: 1

Compression:

Stored size: 941 Bytes

Contents

/*
	Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

//>>built
define("dojo/promise/all",["../_base/array","../Deferred","../when"],function(_1,_2,_3){
"use strict";
var _4=_1.some;
return function all(_5){
var _6,_1;
if(_5 instanceof Array){
_1=_5;
}else{
if(_5&&typeof _5==="object"){
_6=_5;
}
}
var _7;
var _8=[];
if(_6){
_1=[];
for(var _9 in _6){
if(Object.hasOwnProperty.call(_6,_9)){
_8.push(_9);
_1.push(_6[_9]);
}
}
_7={};
}else{
if(_1){
_7=[];
}
}
if(!_1||!_1.length){
return new _2().resolve(_7);
}
var _a=new _2();
_a.promise.always(function(){
_7=_8=null;
});
var _b=_1.length;
_4(_1,function(_c,_d){
if(!_6){
_8.push(_d);
}
_3(_c,function(_e){
if(!_a.isFulfilled()){
_7[_8[_d]]=_e;
if(--_b===0){
_a.resolve(_7);
}
}
},_a.reject);
return _a.isFulfilled();
});
return _a.promise;
};
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dojo-rails-0.14.0 vendor/assets/javascripts/dojo/promise/all.js