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 🙏

© 2025 – Pkg Stats / Ryan Hefner

jslogsystem

v1.2.7

Published

interactive terminal and log system for node

Readme

what is this?

It's a interactive javascript console designed to ease managing your projects. It's a runtime only.

HELPCMD This is an example of running "?" command

The console has a lot of built in commands ready to use.

how to set up?

You can see an example of setting it up THERE. It supports both typescript and javascript, but typescript is recommended as it was written in it.

You can't use any other thing that manipulates STDIN, STDOUT or STDERR (at least for now, we'll see in the future!) with that console.

by importing TS/JS/MINJS you automatically start up the console.

example:

import { keepProcessAlive } from "./logSystem";

keepProcessAlive();

keepProcessAlive keeps the process alive, even though there's no code.

you can also use:

	const logSystem = require("./logSystem.js");

	logSystem.keepProcessAlive();

how to use?

There's a few things that you may want to import:

  • newConsole -> complete API replacement for native NODE.js console with new features (COLORS!)
  • replaceConsole -> replaces global "console" (node native) with full compatible newConsole
  • keepProcessAlive -> keeps the process alive, even though there's no code. Don't use if there's code!
  • useWith -> error wrapper, to ease loging logs. It works like catch-try block but with auto logging
  • registerCommand -> api for registering commands. It also available under newConsole.commands
  • registerCommandLegacy -> legacy version (for 1.0) of registerCommand
  • multiCommandRegister -> used for programs that want easily add a lot of commands with one call
  • actualCrash / ac -> api for crashing program
  • versionInfo -> set your own information info displayed in "version"
  • getCurrentVersionOfLogSystem -> prints the current version of logSystem
  • logNode class -> used for keeping track of log tree (you can set nodes, so you can have like: server.player.meow.inventoryHandler, etc)
  • setLegacyInformation -> to manage legacy stuff (not recommended, unless you want to support things that are deprecated!)

sumarizing...

It's very easy to use and creating a whole documentation for that small thing would be a huge waste of time. But maybe i'll create one in the future

few examples for the end

##printing few logs

import { keepProcessAlive, replaceConsole } from "./logSystem";

replaceConsole();

console.time("start");

console.log("hii! How are you?");
console.error("ERROR!");

// typescript doesnt like that comparision xd
// @ts-expect-error
console.assert(2 == 3, "2 is not equal to 3!");

console.group("meowGroup");

console.log("hi from the group!");

console.groupEnd();

console.count("s");

console.log("test");

console.count("s");

console.timeEnd("start");


keepProcessAlive();

will produce that result: example1

using useWith

import { keepProcessAlive, replaceConsole, useWith } from "./logSystem";

replaceConsole();

useWith("simple task", () => {
    console.log("hi from the task!");
}, "exampler");

useWith("simple task 2", () => {
    throw Error("test error");
}, "exampler2");

keepProcessAlive();

will produce that result: example2

using logNode and registering commands

import { keepProcessAlive, logNode, newConsole, replaceConsole, useWith } from "./logSystem";

replaceConsole();

newConsole.commands.registerCommand("testcmd", {
    callback: (args: string[]): boolean => {
        console.log(":3");

        const par = new logNode("ultraparent");

        // INFO: FOR COMPATIBILITY PURPOSES, YOU CANT USE IT WITH newConsole/console.log!
        // console.log according to standard should take ...string[] ! and we can't change that!

        newConsole.info("hii!", par);
        
        return true;
    }
});

keepProcessAlive();

[!WARNING]
the return type for that will be extended in the future! It currently serves no purpose, but it's kept for compatibility reasons! Boolean type was used to indicate whether the command has written anything to screen

will produce that result: example3