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

iron-log

v0.1.1

Published

Extend of Console Object, easy log with color and also off all your logs in your application

Downloads

19

Readme

iron-log

turn off yours logs writing a single command and give you more colors and methods in console.

Instalation

Download from here

or use npm

 npm install iron-log

How to use it?

 <script src="path/to/IronLog.js"></script>

console.off()

turn off yours logs

  console.log('Hello !'); // => Hello !
  console.off();
  console.log('How you doing?'); => // do nothing

console.on()

also you can turn on whenever you want

  console.log('Hello !'); // => Hello !
  console.off();
  console.log('How you doing?'); => // do nothing
  console.on();
  console.log('I am doing well!'); => // I am doing well 

errors keep coming in the console after console.off(), if you want to turn off the errors you can also do so

  console.off({ error : true });
  console.error('Something went wrong'); => // do nothing

console.openBlock([name]), console.closeBlock([name])

create a group on the console and show the elapsed time in seconds since its start.

  function doSomething() {
    console.openBlock('block 1');
    for (var i = 1; i <= 100000; i++) {
      if (i % 10000 === 0) {
        console.log(i);
      }
    }
    console.closeBlock();
  }

Screenshot

console.progressBar(steps_completed, total_steps)

log in console a progress bar base on the params passed

  console.progressBar(20,60);

Screenshot

also you can something like this

  var bar = console.progressBar(20,60); // render bar (20 of 60)
      bar.add(10);
      bar.log(); // render bar (30 of 60)
      bar.complete();
      bar.log(); // render bar (60 of 60)

console.ok() console.fail()

the same of console.log but in green and red

console.styleCmd(name, styleObj)

create you own console method usign you own styles

  var styles = {
    'font-size' : '25px',
     color : '#00FF00'
  }
  console.styleCmd('test',styles);
  console.test('Hello world !')

Screenshot