# object-keypath

> Get the path to a key of a specific value.

Latest version **0.1.0** (published 2017-07-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install object-keypath
pnpm add object-keypath
yarn add object-keypath
bun add object-keypath
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2017-07-09 |
| First published | 2016-06-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | estrattonbailey |
| Maintainers | estrattonbailey |

## Links

- npm: https://www.npmjs.com/package/object-keypath
- Repository: https://github.com/estrattonbailey/object-keypath
- Homepage: https://github.com/estrattonbailey/object-keypath#readme
- Issues: https://github.com/estrattonbailey/object-keypath/issues
- npm.io page: https://npm.io/package/object-keypath

## Recent versions

- 0.1.0 (latest) — 2017-07-09
- 0.0.4 — 2016-06-10
- 0.0.3 — 2016-06-10
- 0.0.2 — 2016-06-09
- 0.0.1 — 2016-06-08

## README

# `object-keypath`
Return a string representing the keypath to a key of a specified value.

## API 
```javascript
var getPath = require('object-keypath');

var person = {
  name: 'estrattonbailey',
  meta: {
    occupation: {
      title: 'Developer',
      company: 'Barrel'
    },
    other: {
      title: 'Duplicate Key'
    }
  }
}

getPath(person, name, 'estrattonbailey')
// returns `name`

getPath(person, title, 'Developer')
// returns `meta.occupation.title`

getPath(person, title, 'Duplicate Key')
// returns `meta.other.title`
```

MIT License

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