Skip to content

Instantly share code, notes, and snippets.

@cherihung
Last active March 13, 2017 00:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cherihung/1437fe77f1a85a402196 to your computer and use it in GitHub Desktop.
Save cherihung/1437fe77f1a85a402196 to your computer and use it in GitHub Desktop.
R.find(function(w) {return item[key] === w[key];}, collection);
R.find(function(w) {return item === w.id;}, collection);
function(key, collection, item) {
var found = _.find(collection, function(x) {
return x[key] === item[key];
});
return found;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment