Security update for permissions_by_term
[yaffs-website] / node_modules / uncss / node_modules / lodash / hasIn.js
1 var baseHasIn = require('./internal/baseHasIn'),
2     hasPath = require('./internal/hasPath');
3
4 /**
5  * Checks if `path` is a direct or inherited 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 = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
16  *
17  * _.hasIn(object, 'a');
18  * // => true
19  *
20  * _.hasIn(object, 'a.b.c');
21  * // => true
22  *
23  * _.hasIn(object, ['a', 'b', 'c']);
24  * // => true
25  *
26  * _.hasIn(object, 'b');
27  * // => false
28  */
29 function hasIn(object, path) {
30   return hasPath(object, path, baseHasIn);
31 }
32
33 module.exports = hasIn;