๐
Async/await wrapper with error handling, retry and error override ๐ โค๏ธ ๐
Heavily inspired by await-to-js
๐ Install
npm i @zmotivat0r/o0๐ Usage
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('(>_<)'),
});
}๐จ Test
npm testOn this page
Languages
TypeScript83.7%JavaScript16.3%
Contributors
MIT License
Created May 24, 2019
Updated May 19, 2025
