# @ganuz/is-property-descriptor

> Is Property Descriptor is package from Ganuz library

Latest version **0.1.1** (published 2019-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ganuz/is-property-descriptor
pnpm add @ganuz/is-property-descriptor
yarn add @ganuz/is-property-descriptor
bun add @ganuz/is-property-descriptor
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2019-04-16 |
| First published | 2019-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 116.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yisrael Eliev |
| Maintainers | yisraelx |
| Keywords | descriptor, descriptors, modular, modules, properties, property, utilities, utils |

## Links

- npm: https://www.npmjs.com/package/@ganuz/is-property-descriptor
- Repository: https://github.com/yisraelx/ganuz
- Homepage: https://github.com/yisraelx/ganuz#readme
- Issues: https://github.com/yisraelx/ganuz/issues
- npm.io page: https://npm.io/package/@ganuz/is-property-descriptor

## Dependencies (5)

- [@pakal/type-of](https://npm.io/package/@pakal/type-of.md) ^0.2.1
- [@pakal/assertify](https://npm.io/package/@pakal/assertify.md) ^0.2.1
- [@pakal/is-type-of](https://npm.io/package/@pakal/is-type-of.md) ^0.2.1
- [@ganuz/is-data-descriptor](https://npm.io/package/@ganuz/is-data-descriptor.md) ^0.1.1
- [@ganuz/is-accessor-descriptor](https://npm.io/package/@ganuz/is-accessor-descriptor.md) ^0.1.1

## Recent versions

- 0.1.1 (latest) — 2019-04-16
- 0.1.0 — 2019-04-02

## README

# @ganuz/is-property-descriptor
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/ganuz/blob/master/modules/is-property-descriptor)
[![Version](https://img.shields.io/npm/v/@ganuz/is-property-descriptor.svg)](https://www.npmjs.com/package/@ganuz/is-property-descriptor)
[![MIT License](https://img.shields.io/npm/l/@ganuz/is-property-descriptor.svg?color=yellow)](https://github.com/yisraelx/ganuz/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@ganuz/is-property-descriptor.svg?color=green)](https://bundlephobia.com/result?p=@ganuz/is-property-descriptor)
[![TypeScript](https://img.shields.io/badge/100%25-TypeScript-blue.svg)](https://www.typescriptlang.org)

**Is Property Descriptor is package from Ganuz library**

## Install
```sh
$ yarn add @ganuz/is-property-descriptor
```
Or
```sh
$ npm install --save @ganuz/is-property-descriptor
```

## Use
**Module**
```typescript
import {
  default as isPropertyDescriptor
} from '@ganuz/is-property-descriptor';
```

**Browser**
```html
<script src="https://unpkg.com/@ganuz/is-property-descriptor/bundle.umd.min.js"></script>
```
```typescript
let {
  isPropertyDescriptor
} = G;
```

**Examples**
```typescript
 isPropertyDescriptor(); // => false
 isPropertyDescriptor('foo'); // => false
 isPropertyDescriptor({}); // => true
 isPropertyDescriptor({color: 'red'}); // => true
 isPropertyDescriptor(class {}); // => true
 isPropertyDescriptor({value: undefined, foo: 'bar'}); // => true
 isPropertyDescriptor({get: undefined}); // => true
 isPropertyDescriptor({set: Object, enumerable: [0, 1, 2]}); // => true
 isPropertyDescriptor({get(){}, value: 55}); // => false
 isPropertyDescriptor({get: 'foo'}); // => false
 isPropertyDescriptor({get(){}, set: NaN}); // => false
 isPropertyDescriptor({get(){}, writable: undefined}); // => false
 isPropertyDescriptor({set(){}, value: undefined}); // => false
```

*Note: To check the kind of the descriptor use {@link isDataDescriptor} or {@link isAccessorDescriptor}*

### @ganuz/is-property-descriptor/assert
**Module**
```typescript
import {
  default as assertPropertyDescriptor
} from '@ganuz/is-property-descriptor/assert';
```

**Browser**
```html
<script src="https://unpkg.com/@ganuz/is-property-descriptor/assert/bundle.umd.min.js"></script>
```
```typescript
let {
  assertPropertyDescriptor
} = G;
```

**Examples**
```typescript
 assertPropertyDescriptor(null); // throw TypeError
 assertPropertyDescriptor(false); // throw TypeError
 assertPropertyDescriptor({set: []}); // throw TypeError
 assertPropertyDescriptor({get() {}, writable: false}); // throw TypeError
 assertPropertyDescriptor({set: undefined, value: 'foo'}); // throw TypeError
 assertPropertyDescriptor({}); // => {}
 assertPropertyDescriptor({get: undefined}); // => {get: undefined}
 assertPropertyDescriptor({enumerable: true}); // => {enumerable: true}
 assertPropertyDescriptor({value: NaN}); // => {value: NaN}
```


## License
Copyright © [Yisrael Eliev](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/ganuz/blob/master/LICENSE).

---
_Source: https://npm.io/package/@ganuz/is-property-descriptor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
