1 var baseHas = require('./_baseHas'),
2 hasPath = require('./_hasPath');
5 * Checks if `path` is a direct 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 = { 'a': { 'b': { 'c': 3 } } };
16 * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
21 * _.has(object, 'a.b.c');
24 * _.has(object, ['a', 'b', 'c']);
30 function has(object, path) {
31 return hasPath(object, path, baseHas);