Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dustinspecker/is-get-set-prop
Does a JS type have a getter/setter property
https://github.com/dustinspecker/is-get-set-prop
Last synced: 2 days ago
JSON representation
Does a JS type have a getter/setter property
- Host: GitHub
- URL: https://github.com/dustinspecker/is-get-set-prop
- Owner: dustinspecker
- License: mit
- Created: 2015-11-01T15:23:57.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2024-06-03T00:53:11.000Z (5 months ago)
- Last Synced: 2024-09-25T21:44:27.226Z (about 1 month ago)
- Language: JavaScript
- Size: 27.3 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# is-get-set-prop
[![NPM version](https://badge.fury.io/js/is-get-set-prop.svg)](https://badge.fury.io/js/is-get-set-prop) [![Coverage Status](https://img.shields.io/coveralls/dustinspecker/is-get-set-prop.svg)](https://coveralls.io/r/dustinspecker/is-get-set-prop?branch=main)[![Code Climate](https://codeclimate.com/github/dustinspecker/is-get-set-prop/badges/gpa.svg)](https://codeclimate.com/github/dustinspecker/is-get-set-prop)
> Does a JS type have a getter/setter property
## Install
```
npm install --save is-get-set-prop
```## Usage
### ES2015
```javascript
import isGetSetProp from 'is-get-set-prop';isGetSetProp('array', 'length');
// => trueisGetSetProp('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](https://github.com/dustinspecker)