$ cnpm 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.
Copyright 2013 - present © cnpmjs.org | Home |