Check if an object has a local property.
npm install has-own-propertyCheck if an object has a local property.
``sh`
npm install --save has-own-property
`js
import hasOwnProperty from 'has-own-property'
const obj = { a: 1 }
hasOwnProperty(obj, 'a') // true
hasOwnProperty(obj, 'b') // false
`
- object (object, required)name
- (string | number | symbol, required)boolean`
- returns
Determines whether an object has a property with the specified name.