mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Remove references to _.
This commit is contained in:
11
hasIn.js
11
hasIn.js
@@ -5,7 +5,6 @@ import hasPath from './_hasPath.js';
|
||||
* Checks if `path` is a direct or inherited property of `object`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Object
|
||||
* @param {Object} object The object to query.
|
||||
@@ -13,18 +12,18 @@ import hasPath from './_hasPath.js';
|
||||
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
||||
* @example
|
||||
*
|
||||
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
|
||||
* var object = create({ 'a': create({ 'b': 2 }) });
|
||||
*
|
||||
* _.hasIn(object, 'a');
|
||||
* hasIn(object, 'a');
|
||||
* // => true
|
||||
*
|
||||
* _.hasIn(object, 'a.b');
|
||||
* hasIn(object, 'a.b');
|
||||
* // => true
|
||||
*
|
||||
* _.hasIn(object, ['a', 'b']);
|
||||
* hasIn(object, ['a', 'b']);
|
||||
* // => true
|
||||
*
|
||||
* _.hasIn(object, 'b');
|
||||
* hasIn(object, 'b');
|
||||
* // => false
|
||||
*/
|
||||
function hasIn(object, path) {
|
||||
|
||||
Reference in New Issue
Block a user