has-getter

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i has-getter

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • lamansky