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 🙏

© 2024 – Pkg Stats / Ryan Hefner

logcon

v1.0.6

Published

Logcon is an free to use JavaScript library that provides nice console.log output with icons, tables and colors!

Downloads

9

Readme

Logcon

Logcon is an free to use JavaScript library that provides nice console.log output with icons, tables and colors!

NPM: npm i logcon (NPM Package)

Contact Me: https://www.sectly.online/#contact

const logcon = require("logcon");

logcon.warn("This is a warning!");

logcon.error("This is a error!");

logcon.log("This is a log!");

logcon.debug("This is a debug!");

logcon.success("This is a success!");

logcon.stress("This is a stress!");

logcon.info("This is a info!");

logcon.output("This is a output!");

Preview Image

New Since 1.0.3: Tables And More API Functions!

Tables:

const logcon = require("logcon");

const header = ["Id:", "Name:", "Status:"];
const body = [
  ["#1", "Sectly", "Online", "Working On Stuff"], 
  ["#2", "Mike", "Idle"],
  ["#3", "Dan", "Offline"]
];
 
let newtable = new logcon.Table(header, body);
newtable.log(3); // Colors: 0 = Default, 1 = Red, 2 = Green, 3 = Yellow, 4 = Blue, 5 = Purple, 6 = Dark Blue, 7 = White, 8 = Whiteish. (Default = White)

newtable.setHeader(["Id:", "Name:", "Status:", "Extra:"]); // Set Header
newtable.appendBody(["#2", "Mike", "Idle"]); // Append Body
newtable.setBody([["#3", "Dan", "Offline"]]); // Set Body
const tableArray = newtable.array(); // Convert To Array
const tableString = newtable.string(); // Convert To String
newtable.log(); // Log In Console, Defaults To The Default Color With No Color Input
newtable.reset(); // Clear/Reset The Table

newtable.reset()
  .setHeader(["Id:", "Name:", "Status:"])
  .appendBody(["#1", "Sectly", "Online", "Working On Stuff"]);

let string = newtable.string();

console.log(string); // Or logcon.debug("Logcon Table:\n" + string);

Preview Image

API Functions:

const logcon = require("logcon");

const color = logcon.color(4); // Colors: 0 = Default, 1 = Red, 2 = Green, 3 = Yellow, 4 = Blue, 5 = Purple, 6 = Dark Blue, 7 = White, 8 = Whiteish. (Default = White)
console.log(color + "Hello!" + logcon.color(7));

const icon = logcon.icon(4); // Icons: 0 = ×, 1 = √, 2 = ‼, 3 = i, 4 = ⟫, 5 = », 6 = >, 7 = ?, 8 = ›
console.log("[" + icon + "]", logcon.icon(1));

const logger = logcon.type(7); // Types: 1 = Error, 2 = Success, 3 = Warn, 4 = Info, 5 = Stress, 6 = Debug, 7 = Log, 8 = Output.

logger("Logcon Time!");

Preview Image