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

clog_js

v1.2.0

Published

Small Javascript library to color and organize your console.log in Google Chrome.

Downloads

3

Readme

CLog.js

Small (3 KB) Javascript library to color and organize your console.log in Google Chrome !

Normal Group enable

Why should I use it ?

If you frequently use the console.log function in your projects, it might become tricky or confusing to read the log and find exactly what you're looking for at the first glance. With my library you can now color code and organize your output by sections (eg. home, login, etc...) or type (eg. log, error, etc...) so you can easily find exactly what you're looking for in a matter of seconds

How to install

Download from Bower or npm.

npm install clog_js
bower install clog

How to use CLog.

It's very simple to use. Declare a new CLog object with its options.


var options = {
    group: false,            // The console.group mode of Google Chrome is set to false by default
    colors: {               // Define the color. (Default color: Black)
        log: "#31f095",
        home: "#e86024",
        error: "#e22f2f",
        network: "#08bce9",
    }
}

var CLog = new CLog(options);

When you want to log with CLog, use the .log() method.


// The first argument need to be a color. 
CLog.log('log', 'String log', 12345, 'Another String', { id: '1234'}, ['a','b', 'c'], true, false);

//If you want, you can declare directly an hexadecimal 
CLog.log('#52361f', parameters...);

If the first argument isn't a color ( id or hex ), it uses the default color which is black.

Versioning

CLog.js is maintained under the Semantic Versioning guidelines.

License

This software is released under MIT license terms.


Have fun coding!