$ npm install has-own-property
Check if an object has a local property.
npm install --save has-own-property
import hasOwnProperty from 'has-own-property'
const obj = { a: 1 }
hasOwnProperty(obj, 'a') // true
hasOwnProperty(obj, 'b') // false
hasOwnProperty(object, name)object (object, required)name (string | number | symbol, required)booleanDetermines whether an object has a property with the specified name.
© 2010 - cnpmjs.org x YWFE | Home | YWFE