get-own-property

1.0.0 • Public • Published

getOwnProperty

Retrieves a property only if hasOwnProperty() is true.

Installation

npm install get-own-property --save

Usage

const getOwnProperty = require('get-own-property')
 
const obj = {hello: 'world'}
 
getOwnProperty(obj, 'hello') // 'world'
 
typeof obj.toString // 'function'
getOwnProperty(obj, 'toString') // undefined

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.01,007latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.01,007

Package Sidebar

Install

npm i get-own-property

Weekly Downloads

1,007

Version

1.0.0

License

MIT

Last publish

Collaborators

  • lamansky