# get-own-property

> Retrieves a property only if hasOwnProperty() is true.

Latest version **1.0.0** (published 2017-11-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install get-own-property
pnpm add get-own-property
yarn add get-own-property
bun add get-own-property
```

## 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 | 2017-11-28 |
| First published | 2017-11-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | John Lamansky |
| Maintainers | lamansky |
| Keywords | get, object, own, property, hasOwnProperty |

## Links

- npm: https://www.npmjs.com/package/get-own-property
- Repository: https://github.com/lamansky/get-own-property
- Issues: https://github.com/lamansky/get-own-property/issues
- npm.io page: https://npm.io/package/get-own-property

## 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

- 1.0.0 (latest) — 2017-11-28

## README

# getOwnProperty

Retrieves a property only if [`hasOwnProperty()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty) is true.

## Installation

```bash
npm install get-own-property --save
```

## Usage

```javascript
const getOwnProperty = require('get-own-property')

const obj = {hello: 'world'}

getOwnProperty(obj, 'hello') // 'world'

typeof obj.toString // 'function'
getOwnProperty(obj, 'toString') // undefined
```

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