Checks if path is a direct or inherited property of object.
path
object
The object to query.
The key to check.
Returns true if key exists, else false.
true
key
false
4.0.0
has, hasPath, hasPathIn
const object = create({ 'a': create({ 'b': 2 }) })hasIn(object, 'a')// => truehasIn(object, 'b')// => false Copy
const object = create({ 'a': create({ 'b': 2 }) })hasIn(object, 'a')// => truehasIn(object, 'b')// => false
Checks if
path
is a direct or inherited property ofobject
.