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

bare-console

v6.2.0

Published

WHATWG debugging console for JavaScript

Readme

bare-console

WHATWG debugging console for JavaScript.

npm i bare-console

Usage

const Console = require('bare-console')

const console = new Console()

console.log('Hello')
console.error(new Error('Something happened'))

console.time()
for (let i = 0; i < 1000000000; i++) {}
console.timeEnd()

console.trace('Show me')

To install console as a global, require the bare-console/global subpath:

require('bare-console/global')

console.log('Hello')

API

const console = new Console([log])

Construct a new Console. By default, output is written through bare-logger (https://github.com/holepunchto/bare-logger), or bare-system-logger (https://github.com/holepunchto/bare-system-logger) on Android.

Pass a custom log object to redirect output:

const Console = require('bare-console')
const FileLog = require('bare-file-logger')

const console = new Console(new FileLog('my-logs.txt'))

The log object implements the methods used by the console operations being called:

log = {
  debug(...data),
  info(...data),
  warn(...data),
  error(...data),
  clear(),
  format(...data)
}

A minimal backend only needs the subset it intends to support; for example, info is sufficient for console.log().

console.log(...data)

console.info(...data)

console.debug(...data)

console.warn(...data)

console.error(...data)

Forward data to the corresponding method on the backend. console.log() is an alias for console.info().

console.clear()

Forward to log.clear().

console.time([label])

Start a timer identified by label (default 'default'). Warns if a timer with the same label is already running.

console.timeLog([label[, ...data]])

Log the elapsed time for the timer identified by label (default 'default'), along with any additional data. Output uses milliseconds for short durations and seconds beyond one second.

console.timeEnd([label])

Log the elapsed time and remove the timer identified by label (default 'default').

console.count([label])

Increment and log the counter identified by label (default 'default').

console.countReset([label])

Remove the counter identified by label (default 'default').

console.trace(...data)

Log a stack trace prefixed with the formatted data.

console.assert(condition, ...data)

If condition is falsy, log data prefixed with 'Assertion failed'. Otherwise do nothing.

console.table(tabularData[, properties])

Render tabularData as a table. Arrays and plain objects use an (index) column; Map and Set use an (iteration index) column with key and values (or values only) headers. Pass properties to restrict which object keys are shown as columns; the argument is ignored for Map and Set. Values that aren't tabular (primitives, null, functions) fall back to console.log(tabularData).

License

Apache-2.0