has-getter
v1.0.0 object property descriptor get getter function check has
has-getter
A Node.js module that checks if an object has a property with a defined getter function.
Installation
npm install has-getter --save
The module exposes a single function.
Usage
const hasGetter = require('has-getter')
class Test {
get data () { return 'example' }
}
hasGetter(Test.prototype, 'data') // true
const test = new Test()
hasGetter(test, 'data') // true