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

saylo

v0.6.3

Published

use logger.log instead of console.log and you can mute unmute (turn on or off) console.log calls

Readme

Saylo

Saylo is a slim logging helper that wraps the standard console and adds timestamped output. It ships a couple of preconfigured loggers and a tiny factory so you can decide—per environment—which levels should print and which ones should stay silent.

Installation

npm install saylo

Quick start

import chattyLogger, { logger, silentLogger, createLogger } from 'saylo';

chattyLogger.log('Everything is enabled by default');
chattyLogger.debug('Debug output includes a timestamp and level tag');

logger.log('Only log/info/warn/error are enabled here (debug is muted)');

silentLogger.log('This will not print');

const LOGGER_LOG = process.env.LOGGER_LOG === '1';
const LOGGER_DEBUG = process.env.LOGGER_DEBUG === '1';
const appLogger = createLogger({ LOGGER_LOG, LOGGER_DEBUG });

appLogger.log('Respects LOGGER_LOG');
appLogger.debug('Respects LOGGER_DEBUG');

Each message is prefixed with a timestamp in the [YYYY-MM-DD HH:mm:ss] [LEVEL] form.

API

createLogger(options?)

createLogger({
  LOGGER_LOG: boolean;   // defaults to true – controls log/info/warn/error
  LOGGER_DEBUG: boolean; // defaults to true – controls debug (and info if you want it chatty)
}) => Logger

Disabled levels simply map to a no-op (() => undefined), so calling them is cheap.

Logger methods

  • log(message, ...meta)
  • debug(message, ...meta)
  • info(message, ...meta)
  • warn(message, ...meta)
  • error(message, ...meta)

All methods mirror console.* semantics: they accept any extra arguments and pass them straight through to the console.

Built-in instances

  • chattyLogger (default export) – log, debug, info, warn, error all enabled.
  • loggerlog/info/warn/error enabled, debug muted.
  • silentLogger – everything muted.

Because the factory is tiny you can create as many bespoke loggers as you like, with whatever combination of flags or wrapping logic you need.

Tips

  • Pipe environment variables (LOGGER_LOG, LOGGER_DEBUG) into createLogger if you want to control output without touching call sites.
  • Timestamp helpers live in src/funcs.ts; swap them if you prefer different formatting.
  • There’s no buffering or transport layer—if you need to wire the logger into another system, just wrap the functions returned by createLogger.

License

MIT