Last active
March 13, 2017 00:55
-
-
Save cherihung/1437fe77f1a85a402196 to your computer and use it in GitHub Desktop.
This file contains 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
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