| var baseHasIn = require('./_baseHasIn'), |
| hasPath = require('./_hasPath'); |
| * Checks if `path` is a direct or inherited property of `object`. |
| * @param {Object} object The object to query. |
| * @param {Array|string} path The path to check. |
| * @returns {boolean} Returns `true` if `path` exists, else `false`. |
| * var object = _.create({ 'a': _.create({ 'b': 2 }) }); |
| * _.hasIn(object, 'a.b'); |
| * _.hasIn(object, ['a', 'b']); |
| function hasIn(object, path) { |
| return object != null && hasPath(object, path, baseHasIn); |