has-setter
v1.0.0
Published
Checks if an object has a property with a defined setter function.
Downloads
3
Maintainers
Readme
has-setter
A Node.js module that checks if an object has a property with a defined setter function.
Installation
npm install has-setter --save
The module exposes a single function.
Usage
const hasSetter = require('has-setter')
class Test {
set data (value) {}
}
hasSetter(Test.prototype, 'data') // true
const test = new Test()
hasSetter(test, 'data') // true