Created
August 8, 2011 17:18
-
-
Save smathy/1132218 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
huntMen : function(buffy) { | |
var soulmates = []; | |
while (soulmates.length < 10) { | |
// Get 10 candidates for Buffy | |
getMatches( buffy, 10, function(userids) { | |
for (var i = 0; i < userids.length; i++) { | |
var u = userids[i]; | |
// get their pic from our pic server | |
getThumbnail( u, function(thumb) { | |
isPicVampire( thumb, function(is_vamp) { | |
if (! is_vamp) { | |
getPersonality( u, function(personality) { | |
getLastTalked( u, match, function(last_talked) { | |
soulmates.push({ | |
"userid" : match, | |
"thumb" : thumb, | |
"last_talked" : last_talked, | |
"personality" : personality | |
}); | |
}); | |
}); | |
} | |
}); | |
}); | |
} | |
}); | |
} | |
// | |
// Our function can now continue to do | |
// whatever it wants with | |
// soulmates... | |
// | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment