Security update for permissions_by_term
[yaffs-website] / node_modules / uncss / node_modules / lodash / has.js
1 var baseHas = require('./internal/baseHas'),
2     hasPath = require('./internal/hasPath');
3
4 /**
5  * Checks if `path` is a direct property of `object`.
6  *
7  * @static
8  * @memberOf _
9  * @category 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`.
13  * @example
14  *
15  * var object = { 'a': { 'b': { 'c': 3 } } };
16  * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
17  *
18  * _.has(object, 'a');
19  * // => true
20  *
21  * _.has(object, 'a.b.c');
22  * // => true
23  *
24  * _.has(object, ['a', 'b', 'c']);
25  * // => true
26  *
27  * _.has(other, 'a');
28  * // => false
29  */
30 function has(object, path) {
31   return hasPath(object, path, baseHas);
32 }
33
34 module.exports = has;