UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

24 lines (23 loc) 526 B
/** * Checks if `path` is a direct or inherited property of `object`. * * @since 5.7.0 * @category Object * @param object The object to query. * @param key The key to check. * @returns Returns `true` if `key` exists, else `false`. * @see [[has]],[[hasPath]],[[hasPathIn]] * @example * * ```js * const object = create({ 'a': create({ 'b': 2 }) }) * * hasIn(object, 'a') * // => true * * hasIn(object, 'b') * // => false * ``` */ declare function hasIn(object: any, key: any): boolean; export default hasIn;