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

asynchronaut

v1.6.0

Published

Asynchronaut - Navigate the Cosmos of Async Programming Effortlessly.

Readme

Asynchronaut 🚀

Asynchronaut is a powerful utility library for handling JavaScript promises like a pro. Simplify your async workflows with easy-to-use functions like runSequentially, runParallel, and retry and many more.

More to be added soon.

Installation

npm install asynchronaut

Usage

Import the functions you need:

const { runSequentially, runParallel } = require("asynchronaut");

Or, if you're using ESM:

import { runSequentially, runParallel } from "asynchronaut";

// Sample tasks
const tasks = [
  () => new Promise((res) => setTimeout(() => res("Task 1 Complete"), 1000)),
  () => new Promise((res) => setTimeout(() => res("Task 2 Complete"), 500)),
  () => new Promise((res) => setTimeout(() => res("Task 3 Complete"), 300)),
];

(async () => {
  try {
    const results = await runSequentially(tasks);
    console.log(results);
    // Output: ["Task 1 Complete", "Task 2 Complete", "Task 3 Complete"]
  } catch (error) {
    console.error(error.message);
  }
})();

(async () => {
  try {
    const results = await runParallel(tasks);
    console.log(results);
    // Output: ["Task 1 Complete", "Task 2 Complete", "Task 3 Complete"]
  } catch (error) {
    console.error(error.message);
  }
})();

📌 Available Functions

For usage details, checkout src/test/

1. runSequentially

  • Executes an array of async tasks one after another in sequence.
  • Returns a promise that resolves with an array of results.

2. runParallel

  • Executes an array of async tasks simultaneously.
  • Returns a promise that resolves with an array of results when all tasks are completed.

3. retry

  • Retries a provided async function a specified number of times until it succeeds or retries are exhausted.
  • Returns a promise that resolves with the successful result or rejects if all attempts fail.

4. timeoutPromise

  • Executes a given asynchronous task with a specified timeout limit. If the task does not complete within the time limit, the promise is rejected.
  • Returns a Promise that resolves with the task's result or rejects with a timeout error.

5. debouncePromise

  • Delays the execution of async task until after a specified wait time.
  • Returns a Promise that resolves with the task's result or rejects with a timeout error.

6. throttlePromise

  • Throttles an asynchronous task function that returns a Promise, ensuring it is not executed more than once in the specified delay period.

7. batchPromises

  • Processes an array of async tasks in batches of given size.
  • A possible use case can be, "How can I run 100 API calls but only 5 at a time to avoid overloading the server?" -> Use asynchronaut's batchPromises() function.

Running Tests (Jest)

npm test

📖 License

MIT

💡 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

🌟 Inspiration

Asynchronaut helps you navigate the cosmos of asynchronous JavaScript with ease and elegance!