# getval

> read values from nested object like from a flat key value store

Latest version **5.0.1** (published 2017-03-12) · MIT license · 0 weekly downloads

## Install

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

## 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 | 5.0.1 |
| Published | 2017-03-12 |
| First published | 2015-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | serapath |
| Maintainers | serapath |

## Links

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

## Dependencies (4)

- [dsplit](https://npm.io/package/dsplit.md) ^4.0.0
- [x-is-object](https://npm.io/package/x-is-object.md) ^0.1.0
- [x-is-string](https://npm.io/package/x-is-string.md) ^0.1.0
- [x-is-ducktype-array](https://npm.io/package/x-is-ducktype-array.md) ^1.0.1

## Recent versions

- 5.0.1 (latest) — 2017-03-12
- 5.0.0 — 2016-09-06
- 4.0.2 — 2016-09-05
- 4.0.1 — 2016-09-04
- 4.0.0 — 2016-09-04
- 2.0.0 — 2016-07-28
- 1.0.1 — 2015-10-28
- 1.0.0 — 2015-04-08

## README

# getval
read values from nested object like from a flat key value store

# usage
`npm install getval`

```js
  var getval = require('getval')
  var state = { '': 3, a: { b: [5,6,7], '': { '': 15 } } }
  console.log('state =',state)
  console.log(getval(state)) // => { '': 3, a: { b: [5,6,7], '': { '': 15 } } }
  console.log(getval(state, 'a//')) // => 15
  console.log(getval(state, '')) // => 3
  console.log(getval(state, ['a','b'])) // => [5,6,7]
  console.log(getval(state, 'a/b')) // => [5,6,7]
  console.log(getval(state, 'a.b', '.')) // => [5,6,7]
  console.log(getval(state, 'a/b/0')) // => 5

```

# related
* see [setval](https://www.npmjs.com/package/setval)

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