71
rated 0 times
[
76]
[
5]
/ answers: 1 / hits: 32976
/ 12 Years ago, mon, september 10, 2012, 12:00:00
I need the index of the first value in the array, that matches a custom compare function.
The very nice underscorej has a find function that returns the first value where a function returns true, but I would need this that returns the index instead. Is there a version of indexOf available somewhere, where I can pass a function used to comparing?
Thanks for any suggestions!
More From » underscore.js