Skip to content

[Node.js] Retrieves a property only if hasOwnProperty() is true.

License

Notifications You must be signed in to change notification settings

lamansky/get-own-property

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

[Node.js] Retrieves a property only if hasOwnProperty() is true.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published