Created
November 13, 2012 22:03
-
-
Save Veejay/4068732 to your computer and use it in GitHub Desktop.
detect
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
_.detect(collection, function(item) { | |
// conditions here | |
}, | |
{ | |
one: function(item) { | |
// function to execute when one item is found | |
}, | |
none:function(){ | |
// function to execute when no item is found | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment