Repository URL to install this package:
|
Version:
6.0.4 ▾
|
import { AnyArrayOrObj } from '../_typings';
/**
* @name dot.has
* @memberOf dot
* @func
* @since 3.0.0
* @extends dot/getPathSegments
*
* @param obj the object to retrieve the nested property from.
* @param path dot-prop-path to use
* @return has at path
*
* {@link https://github.com/jashkenas/underscore/blob/master/underscore.js#L1369 underscore-has}
* @see {@link underscore-has}
*
* @example
*
* dot.has({a: {b: 2}}, 'a.b'); //=> true
* dot.has({a: {b: 2}}, ['a', 'b']); //=> true
* dot.has({c: {b: 2}}, ['a', 'b']); //=> undefined
*
*/
export default function dotHas(obj: AnyArrayOrObj, path: string | string[]): boolean;