# @express-love/map-values-async

> Replaces properties that are promises with the values they resolve

Latest version **0.1.0** (published 2018-09-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install @express-love/map-values-async
pnpm add @express-love/map-values-async
yarn add @express-love/map-values-async
bun add @express-love/map-values-async
```

## 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 | 2018-09-20 |
| First published | 2018-09-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ken Browning |
| Maintainers | gavacho |

## Links

- npm: https://www.npmjs.com/package/@express-love/map-values-async
- Repository: https://github.com/express-love/express-love/tree/master/packages/map-values-async
- npm.io page: https://npm.io/package/@express-love/map-values-async

## Recent versions

- 0.1.0 (latest) — 2018-09-20

## README

# Installation

    npm install @express-love/map-values-async

# Usage

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## mapValuesAsync

Creates a shallow clone of the specified `source` object. Any properties of
the source object that are promises will be replaced with the resolved value.

### Parameters

-   `source` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** An object with properties that might be promises

### Examples

```javascript
const result = await mapValuesAsync({
  a: Promise.resolve('apples'),
  b: Promise.resolve('bananas'),
  c: 'corn',
});

expect(result).toEqual({
  a: 'apples',
  b: 'bananas',
  c: 'corn',
});
```

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** A clone of `source` with the promise properties replaced with their

---
_Source: https://npm.io/package/@express-love/map-values-async · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
