# typed-conversions

> typed-conversions

Latest version **0.12.0** (published 2021-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install typed-conversions
pnpm add typed-conversions
yarn add typed-conversions
bun add typed-conversions
```

## Health

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

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.12.0 |
| Published | 2021-07-21 |
| First published | 2017-07-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10.0.0 |
| Dependencies | 2 |
| Unpacked size | 107.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ken Snyder |
| Maintainers | ksnyde |
| Keywords | firebase, utility, typescript |

## Links

- npm: https://www.npmjs.com/package/typed-conversions
- Repository: https://github.com/forest-fire/typed-conversions
- Homepage: https://github.com/forest-fire/typed-conversions#readme
- Issues: https://github.com/forest-fire/typed-conversions/issues
- npm.io page: https://npm.io/package/typed-conversions

## Dependencies (2)

- [native-dash](https://npm.io/package/native-dash.md) ^1.16.2
- [common-types](https://npm.io/package/common-types.md) ^1.15.6

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.12.0 (latest) — 2021-07-21
- 0.11.1 — 2020-06-24
- 0.10.5 — 2020-06-23
- 0.10.4 — 2020-05-24
- 0.10.3 — 2020-05-24
- 0.10.2 — 2020-02-13
- 0.10.1 — 2019-03-18
- 0.10.0 — 2019-03-17
- 0.9.7 — 2019-03-16
- 0.9.6 — 2019-03-12
- 0.9.5 — 2019-03-12
- 0.9.4 — 2019-03-12
- 0.9.3 — 2019-03-12
- 0.9.2 — 2019-03-12
- 0.9.1 — 2019-03-12
- … 32 more at https://npm.io/package/typed-conversions/versions

## README

# typed-conversions

A small set of data conversion functions with Typescript 2.x typing. Conversions include:

## General Use

- **hashToArray**&lt; T = any &gt;(_hash_: IDictionary&lt; T &gt;): T[]
- **arrayToHash**&lt; T = any &gt;(_arr_: T[]): IDictionary&lt; T &gt;
- **removeIdPropertyFromHash**&lt; T = any &gt;(_hash_: IDictionary<T>, _keyProp_: keyof T = "id"): IDictionary<Exclude<T, "id">>
- **flatten**&lt; T = any &gt;(list: T[]): T[]

## Firebase Specific

- `snapshotToArray<T>: T[]`
- `snapshotToHash<T>: IDictionary<T>` - combines snap.val() and snap.key into a JS Object
- `snapshotToOrderedArray<T>: T[]`
- `snapshotToOrderedHash<T>: Array<IDictionary<T>>`

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