var oath = require('oathjs');
oath.rateLimit(2, [
uploadFile('favicon.ico'),
uploadFile('nope.gif'),
uploadFile('oh_snap.jpg'),
uploadFile('trololo.mp3')
]).then(function() {
console.log('upload complete');
});
oath.first(
pingHostname1(),
pingHostname2(),
pingHostname3()
).then(function(hostname) {
console.log(hostname + ' is the fastest');
}, function() {
console.warn('The connection may be flaky');
});
setUpEnvironment().then(
oath.ignore(
tryToRefreshEmail(),
updateRSSFeeds(),
downloadNewCalendarEvents()
)
).then(unlockUI);
oath.map(
[getPublicPosts(), getPrivatePosts(), getFriendsPosts()],
function(posts) {
return posts.postData;
}
).then(processAllPostData);
oath.any(
pathFindFromMonsterToPlayer(),
pathFindFromPlayerToMonster(),
pathFindFromMinionToPlayer(),
pathFindFromPlayerToMinion()
).then(function(path) {
console.log(path + ' was found between the player and a monster');
}, function() {
console.warn('There is no path between the player and a monster');
});