Skip to content

Instantly share code, notes, and snippets.

@crtr0
Created January 11, 2013 23:03
Show Gist options
  • Save crtr0/4514714 to your computer and use it in GitHub Desktop.
Save crtr0/4514714 to your computer and use it in GitHub Desktop.
findByPhonenumber = exports.findByPhonenumber = function(phonenumber, callback) {
findBy('byPhonenumber', {key: phonenumber}, function(err, event) {
if (err) {
callback(err, null);
}
else {
findBy('all', {key: [event._id], reduce: false}, callback);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment