# do

> The simplest way to manage asynchronicity

Latest version **0.7.1** (published 2026-08-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install do
pnpm add do
yarn add do
bun add do
```

## Health

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

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.7.1 |
| Published | 2026-08-16 |
| First published | 2013-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 0 |
| Unpacked size | 8.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 45 |
| Maintainers | timur.shemsedinov, kof, aqrln, lundibundi, belochub, nechaido |
| Keywords | metasync, callback, callbacks, promise, sync, async, chain, asyncronous, parallel, sequential, metarhia, step, control, flow, collector, errback, err-first, error-first, callback-last, datacollector, keycollector, composition |

## Links

- npm: https://www.npmjs.com/package/do
- Repository: https://github.com/metarhia/do
- Homepage: https://metarhia.com
- Issues: https://github.com/metarhia/do/issues
- npm.io page: https://npm.io/package/do

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 0.7.1 (latest) — 2026-08-16
- 0.7.0 — 2023-11-09
- 0.6.2 — 2021-05-28
- 0.6.1 — 2021-01-13
- 0.6.0 — 2020-11-17
- 0.5.16 — 2020-11-11
- 0.5.15 — 2020-10-17
- 0.5.14 — 2020-08-06
- 0.5.13 — 2020-05-13
- 0.5.12 — 2020-03-23
- 0.5.11 — 2020-03-09
- 0.5.10 — 2019-12-09
- 0.5.9 — 2019-10-18
- 0.5.8 — 2019-08-27
- 0.5.7 — 2019-04-08
- … 22 more at https://npm.io/package/do/versions

## README

## "do" is the simplest way to manage asynchronicity

[![CI Status](https://github.com/metarhia/do/workflows/Testing%20CI/badge.svg)](https://github.com/metarhia/do/actions?query=workflow%3A%22Testing+CI%22+branch%3Amaster)
[![NPM Version](https://badge.fury.io/js/do.svg)](https://badge.fury.io/js/do)
[![NPM Downloads/Month](https://img.shields.io/npm/dm/do.svg)](https://www.npmjs.com/package/do)
[![NPM Downloads](https://img.shields.io/npm/dt/do.svg)](https://www.npmjs.com/package/do)

If you don't want to use all the async/chain libraries but just want a reliable way to know when the function is done - this is for you.

## Installation

`npm i do`

## Usage

Series async execution

```js
const chain = require('do');

const c1 = chain
  .do(readConfig, 'myConfig')
  .do(selectFromDb, 'select * from cities')
  .do(getHttpPage, 'http://kpi.ua')
  .do(readFile, 'README.md');

c1((err, result) => {
  console.log('done');
  if (err) console.log(err);
  else console.dir({ result });
});
```

Data collector

```js
const chain = require('do');
const fs = require('fs');

const dc = chain.do(6);

dc('user', null, { name: 'Marcus Aurelius' });
fs.readFile('HISTORY.md', (err, data) => dc.collect('history', err, data));
fs.readFile('README.md', dc.callback('readme'));
fs.readFile('README.md', dc('readme'));
dc.take('readme', fs.readFile, 'README.md');
setTimeout(() => dc.pick('timer', { date: new Date() }), 1000);
```

## Run tests

`npm test`

## License & Contributors

Copyright (c) 2013-2026 `do` contributors.
See github for full [contributors list](https://github.com/metarhia/do/graphs/contributors).
Do is [MIT licensed](./LICENSE).

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