1 var baseHas = require('./_baseHas'),
2 hasPath = require('./_hasPath');
5 * Checks if `path` is a direct property of `object`.
11 * @param {Object} object The object to query.
12 * @param {Array|string} path The path to check.
13 * @returns {boolean} Returns `true` if `path` exists, else `false`.
16 * var object = { 'a': { 'b': 2 } };
17 * var other = _.create({ 'a': _.create({ 'b': 2 }) });
22 * _.has(object, 'a.b');
25 * _.has(object, ['a', 'b']);
31 function has(object, path) {
32 return object != null && hasPath(object, path, baseHas);