# deasync-obj

> transforms object with promises values to object with resolved values

Latest version **1.0.1** (published 2022-02-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install deasync-obj
pnpm add deasync-obj
yarn add deasync-obj
bun add deasync-obj
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-02-08 |
| First published | 2022-02-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ofir Elnathan |
| Maintainers | ofirel |
| Keywords | async, sync, traverse, transform |

## Links

- npm: https://www.npmjs.com/package/deasync-obj
- Repository: https://github.com/ofir-e/deasync-obj
- Homepage: https://github.com/ofir-e/deasync-obj#readme
- Issues: https://github.com/ofir-e/deasync-obj/issues
- npm.io page: https://npm.io/package/deasync-obj

## Dependencies (3)

- [traverse](https://npm.io/package/traverse.md) ^0.6.6
- [is-promise](https://npm.io/package/is-promise.md) ^4.0.0
- [@types/traverse](https://npm.io/package/@types/traverse.md) ^0.6.32

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2022-02-08

## README

# deasync-obj

 transforms object with promises values to object with resolved values.

## Installation

    npm install deasync-obj

(typescript ready, no need for @types/deasync-obj :))

## Example

~~~ javascript
import { deasyncObj } from 'deasync-obj';

async function main() {
    const obj = {
        foo: {
            bar: Promise.resolve(5),
            baz: [6, Promise.resolve(7)]
        }
    };

    deasyncObj(obj).then(() => {
        console.log(obj);
    });


}

main();
~~~

This will print:

~~~ javascript
{ foo: { bar: 5, baz: [6, 7] } }
~~~

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