1 var baseHasIn = require('./_baseHasIn'),
2 hasPath = require('./_hasPath');
5 * Checks if `path` is a direct or inherited property of `object`.
10 * @param {Object} object The object to query.
11 * @param {Array|string} path The path to check.
12 * @returns {boolean} Returns `true` if `path` exists, else `false`.
15 * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
17 * _.hasIn(object, 'a');
20 * _.hasIn(object, 'a.b.c');
23 * _.hasIn(object, ['a', 'b', 'c']);
26 * _.hasIn(object, 'b');
29 function hasIn(object, path) {
30 return hasPath(object, path, baseHasIn);
33 module.exports = hasIn;