# value-from-record

> get value of record with first match key

Latest version **3.0.4** (published 2022-10-10) · ISC license · 295 weekly downloads

## Install

```sh
npm install value-from-record
pnpm add value-from-record
yarn add value-from-record
bun add value-from-record
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.4 |
| Published | 2022-10-10 |
| First published | 2020-05-18 |
| Weekly downloads | 295 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 88.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | bluelovers |
| Maintainers | bluelovers |
| Keywords | create-by-yarn-tool, create-by-tsdx |

## Links

- npm: https://www.npmjs.com/package/value-from-record
- Repository: https://github.com/bluelovers/get-from-record
- Homepage: https://github.com/bluelovers/get-from-record#readme
- Issues: https://github.com/bluelovers/get-from-record/issues
- npm.io page: https://npm.io/package/value-from-record

## Dependencies (2)

- [ts-type](https://npm.io/package/ts-type.md) >=2
- [ts-type-predicates](https://npm.io/package/ts-type-predicates.md) ^1.0.9

## Recent versions

- 3.0.4 (latest) — 2022-10-10
- 3.0.3 — 2022-08-29
- 3.0.1 — 2021-12-07
- 2.0.4 — 2021-09-21
- 2.0.3 — 2021-09-21
- 2.0.2 — 2021-08-30
- 2.0.1 — 2021-08-30
- 2.0.0 — 2021-08-30
- 1.0.3 — 2020-05-19
- 1.0.2 — 2020-05-18
- 1.0.1 — 2020-05-18

## README

# README.md



## install

```bash
yarn add value-from-record
yarn-tool add value-from-record
yt add value-from-record
```

```typescript
import valueFromRecord, { keyFromRecord } from '../index';

const record = {
	Path: 'value of Path',
	path: 'value of path',
} as const

let actual;
let expected;

actual = keyFromRecord('PaTh', record);
expected = 'Path';

expect(actual).toStrictEqual(expected);

actual = valueFromRecord('PaTh', record);
expected = record['Path'];

expect(actual).toStrictEqual(expected);
```

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