npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lllretry

v1.0.1

Published

Zero-dependency, lightweight async retry utility with exponential backoff

Readme

LLLRetry

Github npm

Read in English | 한국어로 읽기


🇬🇧 English

Zero-dependency, lightweight async retry utility with exponential backoff for Node.js (ESM).

Features

  • 🚀 Zero Dependencies: Written in pure JavaScript, extremely lightweight.
  • ⚡️ ESM Only: Optimized for the modern ECMAScript Module system.
  • 📈 Exponential Backoff: Built-in backoff mechanism to prevent server overload.
  • 💡 TypeScript Support: Full type inference and auto-completion included.

Installation

npm install lllretry

Usage

import { retry } from 'lll-retry';

// 1. Basic usage (3 retries, exponential backoff enabled)
async function fetchData() {
  const data = await retry(async () => {
    const response = await fetch('[https://api.example.com/data](https://api.example.com/data)');
    if (!response.ok) throw new Error('API Error');
    return response.json();
  });
  console.log(data);
}

// 2. Custom options (5 retries, 500ms initial delay, backoff disabled)
async function connectDB() {
  await retry(async () => {
    await database.connect();
  }, { 
    retries: 5, 
    delay: 500, 
    backoff: false 
  });
}

API

retry(fn, [options])

fn : The asynchronous function to execute.

  • options
  • retries : Maximum number of retry attempts upon failure. (default: 3)
  • delay : Base delay time (ms) between retries. (default: 1000)
  • backoff : Whether to enable exponential backoff. If true, the wait time increases by delay * 2^n. (default: true)

🇰🇷 한국어

Node.js(ESM) 환경을 위한 의존성 없는 초경량 비동기 재시도(Retry) 유틸리티. 지수 백오프(Exponential backoff)를 기본 지원합니다.

주요 기능

  • 🚀 의존성 제로 (Zero Dependencies): 순수 JavaScript로 작성되어 매우 가볍습니다.

  • ⚡️ ESM 전용: 최신 모듈 시스템에 최적화되어 있습니다.

  • 📈 지수 백오프 지원: 서버 과부하를 막기 위해 재시도 대기 시간을 점진적으로 늘려줍니다.

  • 💡 TypeScript 지원: 완벽한 타입 추론과 자동완성을 위한 타입 정의(d.ts)를 포함합니다.

설치 방법

npm install LLLRetry

사용 방법

import { retry } from 'lll-retry';

// 1. 기본 사용법 (3회 재시도, 지수 백오프 적용)
async function fetchData() {
  const data = await retry(async () => {
    const response = await fetch('[https://api.example.com/data](https://api.example.com/data)');
    if (!response.ok) throw new Error('API Error');
    return response.json();
  });
  console.log(data);
}

// 2. 옵션 커스텀 (5회 재시도, 초기 대기시간 500ms, 백오프 끄기)
async function connectDB() {
  await retry(async () => {
    await database.connect();
  }, { 
    retries: 5, 
    delay: 500, 
    backoff: false 
  });
}

API 명세서

retry(fn, [options])

  • fn : 실행할 비동기 함수.
  • options
  • retries : 실패 시 최대 재시도 횟수. (기본값: 3)
  • delay : 실패 후 다음 시도까지의 기본 대기 시간(ms). (기본값: 1000)
  • backoff : 지수 백오프 활성화 여부. true일 경우 대기 시간이 delay * 2^n으로 늘어납니다. (기본값: true)