await-to-js

JSON →
library 3.0.0 ·javascript
verified May 1, 2026

await-to-js is a lightweight zero-dependency utility that wraps a Promise and returns an array with either an error or the resolved value, enabling a Go-like error handling pattern in async/await functions. The current stable version is 3.0.0, with a stable release cadence. It ships TypeScript definitions. Differentiators: extremely simple API, tree-shakable, no external dependencies. It is commonly used in Node.js and browser environments to avoid try-catch blocks and improve code readability when handling promise rejections.

total hits 17
actors 6 distinct systems
last hit 4d ago AhrefsBot
MetaBot
3
GPTBot
2
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇨🇦 Canada · 🇫🇷 France · CO