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

osolog

v1.1.0

Published

It's just a console log extension

Readme

OsoLog 🐻

NPM Version License: MIT

OsoLog is a lightweight, powerful extension for the JavaScript console.log. It transforms messy terminal outputs into structured, readable, and beautiful logs with zero effort.

Perfect for debugging complex objects, generating terminal tables, or preparing logs for external monitors like Splunk.


🚀 Key Features

  • Structured Templates: Format objects into clean, scannable strings (Brackets & Keys).
  • Auto-Tables: Render arrays and multidimensional data as beautiful CLI tables.
  • Rich Coloring: Full integration with the colors library for vibrant terminal output.
  • Transformation Pipes: Pass data through custom functions before logging.
  • TypeScript Support: Full type definitions included for a superior DX.
  • NPM Safe: Fully backwards compatible with older versions.

📦 Installation

npm install osolog

🛠 Quick Start

const OsoLog = require("osolog");
const log = new OsoLog();

// Log anything - Strings, Objects, Arrays, or Mixed!
log.R("Hello World", { status: "Active" }, [1, 2, 3]);

💡 Advanced Usage

1. Object Templates (Brackets & Keys)

Templates are perfect for making objects readable at a glance or for structured logging systems.

const user = { id: 1, name: "Mario", role: "Admin" };

// Brackets Template: Clean and scannable
log.Template({ name: "brackets", title: "USER_AUTH", date: true }).R(user);
// Output: [USER_AUTH][2026-05-16T...][id:1][name:"Mario"][role:"Admin"]

// Keys Template: Valid JSON-like format
log.Template({ name: "keys", title: "API_RES", date: true }).R(user);
// Output: {"title":"API_RES","Date":"...","id":1,"name":"Mario","role":"Admin"}

2. Beautiful Tables

Easily visualize arrays and multidimensional data.

const data = [
  [1, "Node.js", "Stable"],
  [2, "React", "Stable"]
];

// Multidimensional table with custom headers
log.Args({ head: ["ID", "Tech", "Status"] }).R(data);

3. Custom Coloring

Apply vibrant styles to your logs using the built-in color engine.

log.Args({ 
  colors: { key: ["green", "bold"], value: ["yellow"] },
  template: { name: "brackets", title: "DEBUG" } 
}).R({ database: "Connected", latency: "14ms" });

// Or apply a quick rainbow effect to a string
log.Args({ colors: ["rainbow", "bold"] }).R("Everything is awesome!");

4. Transformation Functions (.Funcs)

Process your data on the fly before it hits the console.

const sum = (arr) => arr.reduce((a, b) => a + b, 0);

log.Funcs(sum).R([10, 20, 30]); // Output: 60

⚙️ Configuration

You can initialize OsoLog with a global configuration object:

| Attribute | Default | Description | | :--- | :--- | :--- | | logger | true | Enable or disable all console output. | | enableColors | false | Global toggle for terminal colors. | | string_caps | false | Automatically convert all logged strings to UPPERCASE. | | array | "default" | Set to "default_table" for automatic console.table. | | multiarray | "default" | Set to "custom_table" for advanced CLI tables. |


⌨️ TypeScript Support

OsoLog comes with built-in type definitions. Enjoy full autocompletion in VS Code:

import OsoLog, { ConfigObject } from 'osolog';

const config: ConfigObject = { enableColors: true };
const log = new OsoLog(config);

🔄 Backwards Compatibility

We care about your existing code. Version 1.1.0+ remains fully compatible with:

  • The legacy new osolog.R() constructor pattern.
  • Older configuration typos (e.g., multiarray: "defualt_table").
  • Older template names (e.g., name: "brakets").

📜 License

MIT © Guillermo Salazar