Skip to content

Instantly share code, notes, and snippets.

@Enome
Created June 24, 2012 15:36
Show Gist options
  • Save Enome/2983719 to your computer and use it in GitHub Desktop.
Save Enome/2983719 to your computer and use it in GitHub Desktop.
// Node.js
data.find('id', function(err, response){
var one = response[0];
var many = response;
var error = err;
});
// EventEmitter
var find = data.find('id');
find.one(function(response){
});
find.many(function(response){
});
find.error(function(error){
});
// jQuery Ajax style
data.find('id', {
error: function(error){ },
one: function(response){ },
many: function(response){ }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment