Cleanup lodash.js and ensure _.where returns an empty array when passed an empty properties object.

Former-commit-id: 34d1f8d967806d3c59895eff3a7d4d32262a46ea
This commit is contained in:
John-David Dalton
2012-10-14 18:52:59 -07:00
parent 01ec585a44
commit 16748c0920
4 changed files with 20 additions and 15 deletions

View File

@@ -1729,6 +1729,10 @@
deepEqual(_.where(collection, { 'a': 1 }), [{ 'a': 1 }, { 'a': 1, 'b': 2 }]);
});
test('should return an empty array when passed an empty `properties` object', function() {
deepEqual(_.where(array, {}), []);
});
}());
/*--------------------------------------------------------------------------*/