lme: console.logging done right.




I've been using Node.js for last 2 years. Till then, whenever I wanted to output just a "hi" it requires me to write the entire 13 char long console.log(). I'm lazy enough to write that hard.

It is even insane to find something that console-ed out to the terminal from a pool of texts. If you are using the morgan npm package, then it requires no time to fill up your terminals with loads of text. We need all. Morgan is a great tool for logging HTTP requests. How can we develop an app ignoring the outputs of Morgan!? At the same time, we also need out custom outputs.

Well, there is a great package called chalk. Yeah, it's wonderful with much color. So if you need to output something to console with colors, use chalk. But it takes even longer to construct your console.log() statements. You need to individually style each of your statements.

The lme package


To handle all these shortcomings, I just published a simple npm package named lme (stands for log me), which is:

  • clean,
  • semantically focused,
  • consistent with design,
  • actively maintained,
  • and easy to use.
This package is to output to console with much consistent color and ease!
You'll be able to use lme for logging errors, successes, warnings, and highlights.

Go ahead and try this

npm install --save lme

Here is the documentation.

Popular posts from this blog

How to pass variables to res.render() in Node.js

Talky Messenger Documentation & Setup

4 tiny questions you fail easily.