Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I may not be using _.find properly, but does it work similar as it does for an Array?
_.find
Array
Consider this test case
var s = new Set(); s.add({"prop": "value"}); _.find(s, { "prop": "value" }) // undefined var arr = []; arr.push({"prop": "value"}); _.find(arr, { "prop": "value"}); // Object {prop: "value"}
The text was updated successfully, but these errors were encountered:
Hi @et! _.find works on collections which are things like arrays, strings, objects, & array-like objects.
We currently don't support and have no plans to support sets or maps as collections but I'll keep an eye on the popularity of the request.
Related #737.
Sorry, something went wrong.
Cool, thanks for the quick response.
We do however use Set and WeakMap internally for optimizations in lodash v3 😸
Set
WeakMap
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
No branches or pull requests
I may not be using
_.find
properly, but does it work similar as it does for anArray
?Consider this test case
The text was updated successfully, but these errors were encountered: