# rxjs-async-map

> Map an observable using an async function with a configurable concurreny level, while preserving element order.

Latest version **0.3.0-preview.0** (published 2021-10-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install rxjs-async-map
pnpm add rxjs-async-map
yarn add rxjs-async-map
bun add rxjs-async-map
```

## 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.3.0-preview.0 |
| Published | 2021-10-11 |
| First published | 2018-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 40 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Sam Rijs |
| Maintainers | srijs |

## Links

- npm: https://www.npmjs.com/package/rxjs-async-map
- Repository: https://github.com/srijs/rxjs-async-map
- Homepage: https://github.com/srijs/rxjs-async-map#readme
- Issues: https://github.com/srijs/rxjs-async-map/issues
- npm.io page: https://npm.io/package/rxjs-async-map

## Recent versions

- 0.3.0-preview.0 (latest) — 2021-10-11
- 0.2.0 — 2018-12-18
- 0.1.2 — 2018-04-16
- 0.1.1 — 2018-02-09
- 0.1.0 — 2018-02-08

## README

# rxjs-async-map

Map an observable using an async function with a configurable concurreny level, while preserving element order.

[![CircleCI](https://img.shields.io/circleci/project/github/srijs/rxjs-async-map.svg)](https://circleci.com/gh/srijs/rxjs-async-map/tree/master)
[![Greenkeeper badge](https://badges.greenkeeper.io/srijs/rxjs-async-map.svg)](https://greenkeeper.io/)

## Installation

`rxjs-async-map` is available via npm or yarn:

```
npm i --save rxjs-async-map
```

```
yarn add rxjs-async-map
```

## Usage

```js
import { of } from 'rxjs/observable/of';
import { asyncMap } from 'rxjs-async-map';

const myPromise = val =>
  new Promise(resolve => setTimeout(() => resolve(`Result: ${val}`), Math.random() * 1000));

const source = of(1, 2, 3);

// Map over the observable using the async function, while running
// up to two promises concurrently.
//
// The order of elements is preserved, even if the promises resolve
// out-of-order.
const example = source.pipe(asyncMap(myPromise, /* concurrency: */ 2));

/*
  output:
  "Result: 1"
  "Result: 2"
  "Result: 3"
*/
const subscribe = example.subscribe(val => console.log(val));
```

## License

MIT

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