# prop-values

> Returns an array of the values of all properties (owned and inherited) of an object.

Latest version **2.0.0** (published 2018-05-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install prop-values
pnpm add prop-values
yarn add prop-values
bun add prop-values
```

## 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 | 2.0.0 |
| Published | 2018-05-23 |
| First published | 2018-04-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.0.0 |
| Dependencies | 3 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | John Lamansky |
| Maintainers | lamansky |
| Keywords | object, own, inherited, properties, values, array |

## Links

- npm: https://www.npmjs.com/package/prop-values
- Repository: https://github.com/lamansky/prop-values
- Issues: https://github.com/lamansky/prop-values/issues
- npm.io page: https://npm.io/package/prop-values

## Dependencies (3)

- [sbo](https://npm.io/package/sbo.md) ^1.1.0
- [own-all](https://npm.io/package/own-all.md) ^1.0.0
- [own-values](https://npm.io/package/own-values.md) ^1.0.0

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2018-05-23
- 1.0.0 — 2018-04-13

## README

# prop-values

Returns an array of the values of all properties (owned and inherited) of an object.

## Installation

Requires [Node.js](https://nodejs.org/) 7.0.0 or above.

```bash
npm i prop-values
```

## API

The module exports a single function.

### Parameters

1. Bindable: `obj` (object): The object whose property values you want to get.
2. Object argument:
   * Optional: `own` (boolean): If set to `true`, only the object’s “[own](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty)” property values are returned. If omitted or if set to `false`, both owned and inherited property values are returned.
   * Optional: `enumOnly` (boolean): If set to `true`, only the values of properties defined with the `enumerable` flag will be returned.

### Return Value

An array of values of object properties.

## Example

```javascript
const values = require('prop-values')

values({key: 'value'}, {own: true}) // ['value']
```

## Related

* [prop-entries](https://github.com/lamansky/prop-entries): Same as this module, except it returns key-value pairs.
* [prop-keys](https://github.com/lamansky/prop-keys): Same as this module, except it returns keys.
* [values-array](https://github.com/lamansky/values-array): Supports more than just Objects.

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