# dprop

> tiny util for making enumerable properties

Latest version **1.0.0** (published 2015-05-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install dprop
pnpm add dprop
yarn add dprop
bun add dprop
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-05-24 |
| First published | 2015-05-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Matt DesLauriers |
| Maintainers | mattdesl |
| Keywords | prop, property, prototype, define, defineProperty, defineProperties, enumerable, configurable |

## Links

- npm: https://www.npmjs.com/package/dprop
- Repository: https://github.com/mattdesl/dprop
- Issues: https://github.com/mattdesl/dprop/issues
- npm.io page: https://npm.io/package/dprop

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-05-24

## README

# dprop

[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

Stupidly small utility for making enumerable and configurable getter/setter objects, because ES5 is annoying.

Before:

```js
Object.defineProperties(obj, {
  foo: {
    configurable: true,
    enumerable: true,
    get: function() {
      return 'blah'
    }
  },
  bar: {
    configurable: true,
    enumerable: true,
    get: function() {
      return 'foobar'
    }
  }
})
```

After:

```js
var getter = require('dprop')

Object.defineProperties(obj, {
  foo: getter(function() {
    return 'blah'
  }),
  bar: getter(function() {
    return 'foobar'
  })
})
```

## Usage

[![NPM](https://nodei.co/npm/dprop.png)](https://www.npmjs.com/package/dprop)

#### `dprop([get], [set])`

Returns a `{ configurable: true, enumerable: true }` object with the specified (optional) `get` and `set` functions.

## See Also

- [d](https://www.npmjs.com/package/d) - a little more feature rich

## License

MIT, see [LICENSE.md](http://github.com/mattdesl/dprop/blob/master/LICENSE.md) for details.

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