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

@digta/logger

v0.1.0

Published

Tiny zero-dependency logger: colors, timestamps, file output, log rotation, JSON mode, production mode.

Readme

@digta/logger

Tiny zero-dependency logger for Node. Colors, timestamps, file output, log rotation, JSON mode, production mode. One file, no build step.

npm install @digta/logger

Usage

import logger from "@digta/logger";
// or: const logger = require("@digta/logger");

logger.info("Server Started");
logger.success("PLC Connected");
logger.warn("Heartbeat Missing");
logger.error(err);        // pass an Error, its stack is printed
logger.debug("hidden by default");
[09:31:20] INFO     Server Started
[09:31:22] SUCCESS  PLC Connected
[09:31:24] WARNING  Heartbeat Missing
[09:31:30] ERROR    Socket Hangup

warn and error go to stderr, everything else to stdout. Colors turn off automatically when the output isn't a terminal (piped or redirected).

Custom logger

import { createLogger } from "@digta/logger";

const logger = createLogger({
  level: "debug",           // debug | info | success | warn | error | silent
  file: "./logs/app.log",   // also append to a file
  maxSize: 5 * 1024 * 1024, // rotate at 5 MB (0 = never)
  maxFiles: 3,              // keep app.log.1 … app.log.3
  json: false,              // newline-delimited JSON
  color: true,
  timestamp: true,
});

Production / JSON mode

With NODE_ENV=production (or production: true), output defaults to line-delimited JSON with color off — ready to pipe into any log collector:

{"time":"2026-07-19T16:42:39.975Z","level":"info","msg":"server up"}

Options

| Option | Default | What it does | |--------------|--------------------------------|-----------------------------------------------| | level | "info" | Minimum level to emit; "silent" mutes all | | json | on in production | Newline-delimited JSON instead of pretty text | | color | on for TTY, non-prod, non-json | ANSI colors | | file | null | Path to also append logs to | | maxSize | 5 MB | Rotate file at this size; 0 disables | | maxFiles | 3 | Rotated backups to keep | | timestamp | true | Prefix each line with [HH:MM:SS] | | production | NODE_ENV === "production" | Forces json on, color off |

License

MIT