lodash allows me to check for basic data types using includes :
_.includes([1, 2, 3], 2) > true
But the following does not work:
_.includes([{"a": 1}, {"b": 2}], {"b": 2}) > false
This bothers me because the following methods that look at the collection look just fine:
_.where([{"a": 1}, {"b": 2}], {"b": 2}) > {"b": 2} _.find([{"a": 1}, {"b": 2}], {"b": 2}) > {"b": 2}
What am I doing wrong? How to check the ownership of an object in a collection using includes ?
edit: the question was originally for lodash 2.4.1 updated for lodash 4.0.0
javascript functional-programming lodash
Conrad.Dean Aug 6 '14 at 10:13
source share