auto-console-group
TypeScript icon, indicating that this package has built-in type declarations

1.2.10 • Public • Published

Auto-Console-Group

Introduction

Tame the JS console by automagically grouping console messages.

  • Simple: Drop in replacement for the full console API.
  • Automatic: Groups messages by each Event Loop iteration.
  • Easier Debugging: Makes it much clearer to see what is going on in your app.
  • Adds Time Stamps: Each grouping can be timestamped, to help better see what is happening.
  • Reliable: Uses a Microtask to ensure the message group is always closed on time.

A more readable console output in a couple of minutes.

example output

Above created by example.ts.

Install

Install auto-console-group via npm.

npm install auto-console-group

Or download auto-console-group.js

Setup

The createAutoConsoleGroup() creates a console object with all the same methods as the regular console object, plus a few additional methods to control how a group is displayed.

import createAutoConsoleGroup from 'auto-console-group'

const consoleGroup = createAutoConsoleGroup({ label: 'autoConsoleGroup' })

// All console methods are reflected on consoleGroup
consoleGroup.log('Log message')
consoleGroup.table(['foo', 'bar'])
consoleGroup.count('Counter')

// Set the Event in the group heading
consoleGroup.event('myEvent')

User Guide


NPM © 2025 David J. Bradshaw - License MIT

Readme

Keywords

Package Sidebar

Install

npm i auto-console-group

Weekly Downloads

26,825

Version

1.2.10

License

MIT

Unpacked Size

15.9 kB

Total Files

15

Last publish

Collaborators

  • davidjbradshaw