Introducing JASP: A free and intuitive statistics software
blog.efpsa.org1 pointsby modiho0 comments
var Q = require('q');
function getUserFriends(userName) {
return Q.nfcall(db.users.findOne, {name:userName});
}
function foundOne(user) {
return Q.nfcall(db.friends.find, {userId:user.id});
}
function foundFriends(friends) { ... }
getUserFriends.then(foundOne).then(foundFriends);