JSFiddle - React, Tailwind, and code Playground
by Raynos
JavaScript
var fetch_schemas, fetch_root;
fetch_schemas = function(o) {
var fetch_one = function() {
return $.when();
};
return $.map(o, fetch_one);
};
fetch_root = function() {
return $.when();
};
$.when(fetch_root()).then(function() {
var promises = fetch_schemas([1,2,3]);
$.when.apply($, promises).then(function() {
console.log("DONE", this);
}, function(e) {
console.log("fail", this);
});
});