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

@moecorp/moelog-node

v0.0.2-alpha.1

Published

SDK de MoeLog para Node. Entrega los eventos a un sidecar fuera del proceso.

Readme

@moecorp/moelog-node

The MoeLog SDK for Node: logs, errors and process health, at almost no cost inside your application.

Alpha. The protocol may change.

npm install @moecorp/moelog-node
import { init, log, error, event } from '@moecorp/moelog-node'

init({
  app: 'my-api',
  release: '1.4.2',
  server: 'http://localhost:3000',  // optional; without it, local NDJSON
  key: 'mlk_pub_…',
})

log('info', 'server up', { port: 3000 })
event('checkout.completed', { amount: 4200 })

try {
  await charge()
} catch (e) {
  error(e, { route: '/checkout' })
}

That is all. The sidecar starts itself the first time.

Your app does no networking

It writes to a local unix socket and forgets. A separate process persists, retries and uploads to the server. With the server switched off, emitting five errors cost 0.62 ms, and all five arrived once it reconnected.

Because that process lives outside and outlives your app, it is the only one that can tell you how you died:

| Situation | Signal | |---|---| | Error captured by hand | level 50 event | | Uncaught exception | app.fatal — with a stack, written synchronously while dying | | Blocked event loop | app.blocked / app.recovered | | Abrupt death (SIGKILL, OOM, panic) | app.crashed | | Non-zero exit code | app.exited_error | | The app never starts | app.failed_to_start (with moelog run) |

The three in bold cannot be reported by any SDK living inside the process.

Why there is one package per runtime

Node and Bun differ exactly at the most delicate point, and a single package would have to lie to one of them:

| | Node | Bun | |---|---|---| | Unhandled promise rejection | Becomes an uncaught exception and kills the process | Is printed and the process stays alive with exit code 0 | | What MoeLog does | Nothing: uncaughtExceptionMonitor already sees it with a stack | Registers the listener: it is the only way to see it |

If you use Bun, install @moecorp/moelog-bun. Do not install both.

Options

| Option | Default | What it does | |---|---|---| | app · release · env | 'app' · '0.0.0' · 'development' | Context | | server · key | — | Where the sidecar forwards. Your app never talks to that URL | | dataDir | ./.moelog | Where the sidecar lives | | captureGlobals | true | Unhandled-error handlers | | hbMs | 2000 | Heartbeat; a block is declared after 3 missed beats | | sampleRate · errorSampleRate | 1 | Sampling | | maxBuffer · flushAt · flushIntervalMs | 64 · 32 · 5000 | Buffer and triggers | | dedupeWindowMs | 2000 | Fingerprint deduplication | | beforeSend | — | Last chance to modify or drop an event | | debug | false | Internal warnings |

CLI

moelog run -- node run index.ts   # supervise: the only way to see "it never started"
moelog status · tail · alerts · stop

Dependencies

Zero third-party. Only @moecorp/moelog-core and @moecorp/moelog-sidecar, from this project.

License

AGPL-3.0-only.

Note that this SDK is imported into your application, so the AGPL's copyleft reaches further here than it would for a server-only project. If that is a problem for your use case, open an issue: a permissive license for the SDKs with AGPL kept for the server is under consideration.