Show Images in Console with Node.js console-png
Introducing colors into the command line makes console reading much easier which is why finding Chalk was a life-changing event for me. I started digging deeper into making the console more graphical and I found another module that could bring the console to life: console-png!
Assuming you've installed console-png or grabbed it from GitHub, it doesn't take much to output an image to the console:
// Attach module to the console
// Read the image, let console-png output it to console
console.png(require('fs').readFileSync(__dirname + '/logo.png'));
As for the use case of such a module, there probably aren't a ton. It would be useful to show a command line splash screen when an app starts up, and it may be useful as a feedback mechanism as the user follows app flow.
This is the hardest thing I've ever had to write, much less admit to myself. I've written resignation letters from jobs I've loved, I've ended relationships, I've failed at a host of tasks, and let myself down in my life. All of those feelings were very...
This article serves as a point-by-point...
One of the most popular code snippets of posted on my blog has been the scrolling "Go To Top" link snippet. The premise of the snippet is simple: once the user scrolls an element (usually the BODY element) past a given threshold, a "Go...