COLLECTED BY
Organization:
Internet Archive
Focused crawls are collections of frequently-updated webcrawl data from narrow (as opposed to broad or wide) web crawls, often focused on a single domain or subdomain.
The Wayback Machine - https://web.archive.org/web/20201220221115/https://github.com/lodash/lodash/blob/master/hasIn.js
Permalink
Cannot retrieve contributors at this time
24 lines (23 sloc)
553 Bytes
/**
* Checks if `path` is a direct or inherited property of `object`.
*
* @since 4.0.0
* @category Object
* @param {Object } object The object to query.
* @param {string } key The key to check.
* @returns {boolean } Returns `true` if `key` exists, else `false`.
* @see has, hasPath, hasPathIn
* @example
*
* const object = create({ 'a': create({ 'b': 2 }) })
*
* hasIn(object, 'a')
* // => true
*
* hasIn(object, 'b')
* // => false
*/
function hasIn ( object , key ) {
return object != null && key in Object ( object )
}
export default hasIn
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.