has-setter
v1.0.0 object property descriptor set setter function check has
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