has-setter

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i has-setter

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • lamansky