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

@renkoya1/dev-log

v0.0.4

Published

A simple development logging utility

Downloads

657

Readme

dev-log

A simple development logging utility that only logs in non-production environments.

Installation

npm install @renkoya1/dev-log

Usage

Basic Usage

import devLogger from "@renkoya1/dev-log";

// Direct function call
devLogger("Hello World!");

// Method calls
devLogger.log("Hello");
devLogger.debug("Debug message");
devLogger.info("Info message");
devLogger.warn("Warning message");
devLogger.error("Error message");

Named Import

import { devLogger } from "@renkoya1/dev-log";

devLogger.warn("Warning message");
devLogger.info("Info message");

Features

  • Environment-aware: Only logs when NODE_ENV !== "production" or __DEV__ is true
  • Multiple log levels: debug, info, warn, error
  • Direct function call: devLogger() works the same as devLogger.log()
  • Timestamp logging: devLogger.time()
  • Pretty printing: devLogger.pretty() for formatted objects
  • Custom prefixes: devLogger.prefix("API")() for categorized logs
  • Table display: devLogger.table() for array/object visualization
  • Log grouping: devLogger.group() for organized logs
  • Stack tracing: devLogger.trace() for call stack
  • Performance measurement: devLogger.measure() for timing functions
  • TypeScript support included

Advanced Examples

import devLogger from "@renkoya1/dev-log";

// Timestamp logging
devLogger.time("User logged in at");

// Pretty print objects
devLogger.pretty({ user: { name: "John", age: 30 } });

// Custom prefix
const apiLogger = devLogger.prefix("API");
apiLogger("Request received");
apiLogger("Response sent");

// Table display
devLogger.table([
  { name: "John", age: 30 },
  { name: "Jane", age: 25 }
]);

// Log grouping
devLogger.group("User Authentication", () => {
  devLogger.info("Checking credentials");
  devLogger.info("Credentials valid");
});

// Performance measurement
await devLogger.measure("Database Query", async () => {
  // Your async operation here
  return await fetchData();
});

// Stack tracing
devLogger.trace("Debugging call stack");

API Reference

Core Methods

  • devLogger() / devLogger.log() - General logging
  • devLogger.debug() - Debug level logging
  • devLogger.info() - Info level logging
  • devLogger.warn() - Warning level logging
  • devLogger.error() - Error level logging

Utility Methods

  • devLogger.time() - Log with ISO timestamp
  • devLogger.pretty() - Pretty print objects with JSON formatting
  • devLogger.prefix(prefix) - Create prefixed logger function
  • devLogger.table(data) - Display data in table format
  • devLogger.group(label, fn) - Group related logs
  • devLogger.trace() - Log call stack
  • devLogger.measure(label, fn) - Measure function execution time

Environment Detection

The logger automatically detects development environment using:

  1. __DEV__ global variable (if defined)
  2. process.env.NODE_ENV !== "production"

License

MIT