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

natural-log

v3.3.3

Published

Console and Popups All in One

Readme


Usage

Install this package in your project:

# via npm
npm add natural-log

# or pnpm
pnpm add natural-log

# or yarn
yarn add natural-log

Import the package and initialize:

// index.tsx
import { natlog } from "natural-log";

// initialize
natlog();

// with options
natlog({...});

Available options are given in Options.

Now, the next time console methods are called (even in the debug console), prompts will appear on your page! Different console methods result in different prompt colors, too.

Demo

You can expand/collapse objects, arrays etc. all thanks to Omnires!

The prompts are responsive with regards to device size.

Isn't that cool? Frees our hands from the debug console...!
(Though the message will still reach the debug console, if you like to inspect it there)

The prompts would fade after some time if not being inspected. To dismiss them manually, just hit the cross.

Dismiss

The package also stores console history, and exposes it to the debug console via natlog.history.

Details on the exposed object in Exposed Object.

Options

| Property | Description | Default | | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | console | Boolean or array of method names defining the log level.For instance, ["log", "error"] will mute all other console methods except console.log and console.error.For production builds you can set it to false or ["error"] to mute certain console methods. | true | | prompts | Same as options.console except it configures prompts instead. | true | | history | Toggle console history.If on, the console history can be accessed via the debug console variable natlog.history, even if methods are muted.For production builds, set to false for performance. | true | | timeout | Duration a prompt would last before fading away in seconds, if the prompt is not being inspected. | 20 | | maximum | Number of prompts that could be shown on the page at the same time.The oldest prompt present would be removed if the number exceeds the maximum. | 5 |

Exposed Object

A natlog object is exposed to the debug console which could be accessed directly. The same object is also returned by the natlog() initializer.

It contains the following useful properties.

| Property | Description | | -------- | ---------------------------------------------------------------- | | options | The resolved natural-log options. | | console | The native console after muting which would not trigger prompts. | | history | The console history stack, if history is enabled in options. | | now() | The current timestamp in the same format as history entries. | | root | The natural-log root prompts element. |

Notes

The package is mainly for debugging on phones and tablets, or when the debug console is lagging like hell because of GSAP etc.


 You thought it's the maths one?