has
_.has(path, object)
# Ⓢ [Ⓣ][1] Ⓝ
Checks if path is a direct property of object.
Since
0.1.0
Arguments
path(Array|string): The path to check.object(Object): The object to query.
Returns
(boolean): Returns true if path exists, else false.
Example
var object = { 'a': { 'b': 2 } };
var other = _.create({ 'a': _.create({ 'b': 2 }) });
_.has('a', object);
// => true
_.has('a.b', object);
// => true
_.has(['a', 'b'], object);
// => true
_.has('a', other);
// => false