# rtri **A tiny utility for exponentially retryin** js downloads licenses gzip size brotli size

This is free to use software, but if you do like it, consisder supporting me ❤️ [![sponsor me](https://badgen.net/badge/icon/sponsor?icon=github&label&color=gray)](https://github.com/sponsors/maraisr) [![buy me a coffee](https://badgen.net/badge/icon/buymeacoffee?icon=buymeacoffee&label&color=gray)](https://www.buymeacoffee.com/marais)
## ⚙️ Install ```shell npm add rtri ``` ## 🚀 Usage ```ts import { retry } from 'rtri'; const get_data = await retry( async () => { const response = await fetch('https://example.com'); if (!response.ok) throw new Error('not ok'); return response.json(); }, { attempts: 3 }, ); await get_data(); ``` ## License MIT © [Marais Rossouw](https://marais.io)