mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Make _.where iterate over only own properties.
Former-commit-id: 29b4cafe5271cad70c711c2d401cea627fa97e33
This commit is contained in:
@@ -2537,10 +2537,7 @@
|
||||
* // => [{ 'name': 'moe', 'age': 40 }]
|
||||
*/
|
||||
function where(collection, properties) {
|
||||
var props = [];
|
||||
forIn(properties, function(value, prop) {
|
||||
props.push(prop);
|
||||
});
|
||||
var props = keys(properties);
|
||||
return filter(collection, function(object) {
|
||||
var length = props.length;
|
||||
while (length--) {
|
||||
|
||||
Reference in New Issue
Block a user