# @zmotivat0r/o0

> Async/await wrapper with error handling, retry and error override

Latest version **1.0.2** (published 2019-05-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @zmotivat0r/o0
pnpm add @zmotivat0r/o0
yarn add @zmotivat0r/o0
bun add @zmotivat0r/o0
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-05-24 |
| First published | 2019-05-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Michael Yali |
| Maintainers | zmotivat0r |
| Keywords | typescript, node, error, handler, promise, es2018, async, asyncawait, try, catch, trycatch, retry, go, golang, await-to-js, await-to-ts |

## Links

- npm: https://www.npmjs.com/package/@zmotivat0r/o0
- Repository: https://github.com/zMotivat0r/oO
- Homepage: https://github.com/zMotivat0r/0_o#readme
- Issues: https://github.com/zMotivat0r/oO/issues
- npm.io page: https://npm.io/package/@zmotivat0r/o0

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [@temporal-architect/claude-plugin](https://npm.io/package/@temporal-architect/claude-plugin.md) — 335 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2019-05-24
- 1.0.1 — 2019-05-24
- 1.0.0 — 2019-05-24

## README

<div align="center">
  <strong>Async/await</strong> wrapper with error handling, retry and error override
</div>

<div align="center">
  <a href="https://travis-ci.org/zMotivat0r/oO.svg?branch=master">
    <img src="https://img.shields.io/travis/zMotivat0r/oO/master.svg?style=flat-square"
      alt="Build Status" />
  </a>
  <a href="https://codecov.io/github/zMotivat0r/oO">
    <img src="https://img.shields.io/coveralls/github/zMotivat0r/oO.svg?style=flat-square"
      alt="Test Coverage" />
  </a>
</div>
<div align="center">
  <sub>Heavily inspired by <a href="https://github.com/scopsy/await-to-js">await-to-js</a></sub>
</div>
<div align="center">
  <img src="https://github.com/zMotivat0r/oO/raw/master/img/example4.png" alt="Example" />
</div>

## :rocket: Install

```shell
npm i @zmotivat0r/o0
```

## :eyeglasses: Usage

```typescript
import { oO } from '@zmotivat0r/o0';

async function do() {
  const [err, user] = await oO(findUser(1));

  const [, projects] = await oO(findProjects(1), {
    retry: 5,
  });

  const [customError] = await oO(doStuff(), {
    err: new SomeCustomError('(>_<)'),
  });
}
```

## :hammer: Test

```shell
npm test
```

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