# @cloudflare/util-async

> Cloudflare Async Util

Latest version **1.2.18** (published 2026-06-30) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install @cloudflare/util-async
pnpm add @cloudflare/util-async
yarn add @cloudflare/util-async
bun add @cloudflare/util-async
```

## Health

**Score 50/100 (C)** — status: active.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.2.18 |
| Published | 2026-06-30 |
| First published | 2018-05-09 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James Kyle <jkyle@cloudflare.com> |
| Maintainers | cf-ci-write, dash_service_account, wrangler-publisher, cf-npm-publish |

## Links

- npm: https://www.npmjs.com/package/@cloudflare/util-async
- npm.io page: https://npm.io/package/@cloudflare/util-async

## Recent versions

- 1.2.18 (latest) — 2026-06-30
- 1.2.17 — 2026-01-22
- 1.2.16 — 2026-01-21
- 1.2.15 — 2021-10-28
- 1.2.14 — 2021-10-22
- 1.2.13 — 2021-10-21
- 1.2.12 — 2021-04-23
- 1.2.11 — 2020-04-27
- 1.2.9 — 2020-02-12
- 1.2.8 — 2020-02-12
- 1.2.7 — 2020-02-02
- 1.2.5 — 2020-02-01
- 1.2.4 — 2020-02-01
- 1.2.3 — 2019-10-15
- 1.2.2 — 2019-10-14
- … 16 more at https://npm.io/package/@cloudflare/util-async/versions

## README

# cf-util-async

> Cloudflare Async Util

## Installation

```sh
$ npm install cf-util-async
```

## Usage

Running async functions in a series:

```js
import http from 'cf-util-http';
import {series} from 'cf-util-async';

series([
  cb => http.get('endpoint-1.json', null, cb), // If an error occurs, then the rest of the callbacks are not called.
  cb => http.get('endpoint-2.json', null, cb)
], (err, results) => {
  if (err) {
    console.log(err.body); // > { errors: [{ message: 'Error!' }] }
  } else {
    console.log(res.body); // > [{ result: { id: 1, ... } }, { result: { id: 2, ... } }]
  }
});
```

Running async functions in parallel:

```js
import http from 'cf-util-http';
import {parallel} from 'cf-util-async';

parallel([
  cb => http.get('endpoint-1.json', null, cb),
  cb => http.get('endpoint-2.json', null, cb)
], (err, results) => {
  if (err) {
    console.log(err.body); // > { errors: [{ message: 'Error!' }] }
  } else {
    console.log(res.body); // > [{ result: { id: 1, ... } }, { result: { id: 2, ... } }]
  }
});
```

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