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

isotropic-console

v0.3.1

Published

Console object with isotropic settings

Downloads

5

Readme

isotropic-console

npm version License

A pre-configured Node.js console object with enhanced inspection settings and natural sorting of object properties.

Why Use This?

  • Consistent Output: Standardized console output formatting across your applications
  • Natural Sorting: Object properties are sorted naturally (e.g., "item2" before "item10")
  • Unlimited Depth: Full inspection of nested objects with unlimited depth
  • Improved Readability: Non-compact format with unlimited line length for better log readability
  • Drop-in Replacement: Works as a direct replacement for the standard Node.js console

Installation

npm install isotropic-console

Usage

import _console from 'isotropic-console';

// Use just like the standard console
_console.log('Hello world');

// Complex objects are displayed with enhanced formatting
_console.log({
    deeply: {
        nested: {
            object: {
                with: [
                    'many',
                    'properties',
                    {
                        that: 'would normally be truncated'
                    }
                ]
            }
        }
    }
});

// Object properties are sorted naturally
_console.log({
    item10: 'value',
    item2: 'value',
    item1: 'value'
});
// Output order: item1, item2, item10

Features

Enhanced Object Inspection

The console is configured with the following inspection options:

  • breakLength: Infinity - No arbitrary line breaks in output
  • colors: false - No ANSI color codes in object inspection (colors still work for console.error, etc.)
  • compact: false - Full, readable formatting rather than compressed
  • customInspect: true - Respects custom [util.inspect.custom] implementations
  • depth: Infinity - No depth limitation for nested objects
  • maxArrayLength: Infinity - Arrays are not truncated
  • sorted: true - Object properties are sorted using natural sort

Natural Sorting

Object properties are sorted using the isotropic-natural-sort module, which ensures that:

  • Properties are sorted alphabetically but in a human-friendly way
  • Numeric parts of property names are sorted numerically (e.g., "prop2" before "prop10")
  • Sorting is case-insensitive by default

Standard Console API

All standard console methods are available:

  • console.log(), console.info(), console.debug() - Output to stdout
  • console.error(), console.warn() - Output to stderr
  • console.dir() - Object inspection
  • console.table() - Display objects in tabular format
  • console.time(), console.timeEnd() - Timing operations
  • And all other methods from Node.js Console

Examples

Logging Objects with Natural Property Order

import _console from 'isotropic-console';

_console.log({
    z: 1,
    a: 2,
    item10: 3,
    item2: 4,
    item1: 5
});

// Output:
// {
//   a: 2,
//   item1: 5,
//   item2: 4,
//   item10: 3,
//   z: 1
// }

Inspecting Deeply Nested Objects

import _console from 'isotropic-console';

const _deepObject = {
    level1: {
        level2: {
            level3: {
                level4: {
                    data: [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12
                    ]
                }
            }
        }
    }
};

_console.log(deepObject);
// Output will show the complete object with all nesting levels
// and the full array, unlike standard console which would truncate

Integration with Logging Libraries

isotropic-console can be used as a replacement for the default console with many logging libraries:

import _console from 'isotropic-console';
import _winston from 'winston';

// Configure winston to use isotropic-console for console transport
const _logger = _winston.createLogger({
    transports: [
        new winston.transports.Console({
            console: _console
        })
    ]
});

Contributing

Please refer to CONTRIBUTING.md for contribution guidelines.

Issues

If you encounter any issues, please file them at https://github.com/ibi-group/isotropic-console/issues