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

mnemonix

v1.1.0

Published

A light-weight utility toolkit for Node.js and TypeScript, focused on smart, developer-friendly logging and diagnostics. Mnemonix gives you beautiful logs, stack-aware insights, execution timers, memory tracking, and event loop monitoring — with zero se

Readme

🧠 Mnemonix

A light-weight utility toolkit for Node.js and TypeScript, focused on smart, developer-friendly logging and diagnostics.
Mnemonix gives you beautiful logs, stack-aware insights, execution timers, memory tracking, and event loop monitoring — with zero setup.

✅ Universal Compatibility: Works seamlessly with both CommonJS (require) and ES Modules (import).

📦 Installation

npm install mnemonix
# or
yarn add mnemonix

📣 Logger

Mnemonix includes a built-in logger object with four core methods:

  • info()
  • warn()
  • error()
  • debug()

These log messages with timestamps, color-coded levels, and clickable file references.

✅ Usage

import { logger } from 'mnemonix';

// Basic usage
logger.info('Server started');

// Context and Metadata
logger.warn('Missing field', { field: 'email' });
logger.error('Database error', new Error('Connection failed'));

🖨️ Example Output

💡 In supported terminals (like VSCode or iTerm2), the file name is clickable — taking you straight to the code.

2026-06-24T11:00:00.123Z [INFO] Server started (index.ts)
2026-06-24T11:00:01.456Z [WARN] Missing field (user.ts)
{ field: 'email' }

⏱️ Timer

Measure and log how long a function (sync or async) takes to run.

✅ Usage

import { timer } from 'mnemonix';

// Async functions
await timer('Load users', async () => {
    await db.fetchUsers();
});

// Sync functions
timer('Complex Math', () => {
    heavyComputation();
});

🖨️ Example Output

2026-06-24T12:05:00.123Z [INFO] Load users took 201ms

💾 Memory Utilities (Heap)

Monitor your application's memory usage in real-time. Detect leaks, optimize heavy operations, and keep track of your heap size with precision.

heapSnapshot()

Instantly log the current heap usage of your application.

import { heapSnapshot } from 'mnemonix';

heapSnapshot('Initialization');

Output:

2026-06-24T12:00:00.000Z [INFO] [MEMORY] Initialization: 25.4 MB

heapCheck()

Measure the difference in memory allocation caused by a function. Great for finding memory leaks or optimizing heavy processes.

import { heapCheck } from 'mnemonix';

await heapCheck('Process Huge Data', async () => {
    const data = new Array(1_000_000).fill('test');
});

Output:

2026-06-24T12:00:05.000Z [INFO] [MEMORY] Process Huge Data: 35.8 MB (+10.4 MB)

Displays the final memory usage and the delta (e.g., +10.4 MB in red, or -2 KB in green).


🍞 Breadcrumbs (Trace History)

Keep a running history of the last 50 log events in memory without spamming your console. When an error occurs, flush the breadcrumbs to see exactly what led up to the crash.

✅ Usage

import { addBreadcrumb, flushBreadcrumbs } from 'mnemonix';

// Log internal steps that you don't want to see unless something breaks
addBreadcrumb('User clicked checkout');
addBreadcrumb('Validating cart items', 'CART');

try {
    processOrder();
} catch (err) {
    console.error('Order failed!');
    // Print the history leading up to the error
    flushBreadcrumbs();
}

💓 Heartbeat (Event Loop Monitor)

Node.js is single-threaded. If a heavy calculation blocks the event loop, your server freezes. The Heartbeat monitor detects these freezes and warns you.

✅ Usage

import { startHeartbeat } from 'mnemonix';

// Start monitoring (best done at app startup)
startHeartbeat();

// If the event loop is blocked for >100ms, you'll see:
// [WARN] [🔥 EVENT LOOP BLOCKED] delayed by 450ms

📁 File Structure Insight

Mnemonix uses Error.captureStackTrace to find the file that called the tool — helping you debug faster by showing exactly where each log or measurement originated.


🪪 License

MIT © 2026