npm.io
2.0.0 • Published 2 years ago

is-get-set-prop

Licence
MIT
Version
2.0.0
Deps
2
Size
4 kB
Vulns
0
Weekly
0
Stars
1

is-get-set-prop

NPM version Coverage Status

Code Climate

Does a JS type have a getter/setter property

Install

npm install --save is-get-set-prop

Usage

ES2015
import isGetSetProp from 'is-get-set-prop';

isGetSetProp('array', 'length');
// => true

isGetSetProp('ARRAY', 'push');
// => false

// is-get-set-prop can only verify native JS types
isGetSetProp('gulp', 'task');
// => false;

API

isGetSetProp(type, propertyName)
type

Type: string

A native JS type to examine. Note: is-get-set-prop can only verify native JS types.

propertyName

Type: string

Property name to determine if a getter/setter of type.

LICENSE

MIT Dustin Specker

Keywords