# getters-to-props

> Get simple properties from object of getters.

Latest version **1.1.1** (published 2019-04-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install getters-to-props
pnpm add getters-to-props
yarn add getters-to-props
bun add getters-to-props
```

## 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.1.1 |
| Published | 2019-04-10 |
| First published | 2015-03-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Anders D. Johnson |
| Maintainers | adjohnson916 |
| Keywords | getter, getters, property, properties, object, objects |

## Links

- npm: https://www.npmjs.com/package/getters-to-props
- Repository: https://github.com/AndersDJohnson/getters-to-props.js
- Issues: https://github.com/AndersDJohnson/getters-to-props.js/issues
- npm.io page: https://npm.io/package/getters-to-props

## Recent versions

- 1.1.1 (latest) — 2019-04-10
- 1.1.0 — 2015-07-04
- 1.0.1 — 2015-03-08
- 1.0.0 — 2015-03-08

## README

# getters-to-props.js

Get simple properties from object of getters.

## Install

Node
```
npm install --save getters-to-props
```

Bower (AMD, Global)
```
bower install --save getters-to-props
```

## Use

```js
var gettersToProps = require('getters-to-props');

var obj = {
  getThing: function () {
    return 1;
  },
  setThing: function () {},
  getMore: function () {
    return { another: 'yep' };
  },
  notMe: 'nope',
  getFailure: function () {
    throw new Error("oops");
  }
};

props = gettersToProps(obj);

// props is now:
{
  thing: 1,
  more: { another: 'yep' },
  failure: undefined
}

// or options, e.g. "others"

props = gettersToProps(obj, {
  others: true
});

// props is now:
{
  thing: 1,
  more: { another: 'yep' },
  failure: undefined,
  notMe: 'nope'
}

```

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