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

memoq

v1.2.0

Published

A memoized function queue

Readme

memoq

A simple task queue that stores the output of each task and associates it with an id. Future tasks can retrieve old task results and perform operations on it. Additionally, the NodeJS process executing the task queue can be killed and restarted where it left off (assuming cache files have persisted and user-instantiated queue has not been modified).

Installation

# npm
npm i memoq@latest

#pnpm
pnpm add memoq@latest

Usage

import { Queue, Task } from 'memoq';

const queue = new Queue();

queue.add(new Task(
	`root`,							// ID of task
	[],								// Depends on data from no other tasks
	async (data) => {				// `data` is empty object
		return 3;
	}
));

queue.add(new Task(
	`step1`,						// ID of task
	[],								// Depends on data from no other tasks
	async (data) => {				// `data` is empty object
		return 4;
	}
));

queue.add(new Task(
	`step2`,						// ID of task
	[`root`, `step1`],				// Depends on data from task IDs `root` and `step1`
	async (data) => {				// `data` contains cached results
		const dr = data['root'];	// Return value of `root` task
		const ds1 = data['step1'];	// Return value of `step1` task
		const val = dr + ds1;
		console.log(val);			// Outputs 7
		return val;
	}
));

await queue.start();				// Start the queue

Reference

class Queue

public new Queue()

Creates a new instance of Queue

public add(task: Task): void

Adds a Task instance to the queue

  • task - the Task to add

public async start(): void

Starts executing tasks in the queue, and recalls prior state from the cache if present

class Task

public new Task(id: string, dependsOn: string[], fn: TaskFunction, delay: Returnable<number>)

Creates a new instance of Task

  • id - ID of the new task
  • dependsOn - IDs of the data to import into the new task
  • fn - the actual function to execute (parameter data given)
  • delay - the delay, in ms, before this task begins executing (default 0)
    • This is of type Returnable<number>, which means it can either by of type number or a function that returns a value of type number

Changelog

1.2.0

Improvements

  • Queue - added task duration in logging

Bugs

  • N/A

1.1.0

Improvements

  • Task - delay parameter in constructor modified
  • README - Changelog added

Bugs

  • N/A

1.0.1

Improvements

  • README.md added
  • LICENSE added

Bugs

  • N/A

1.0.0

Improvements

  • Package created

Bugs

  • N/A

Built with ❤️ by @RyloRiz