102

GitHub - ines/console-dot-emoji: Custom Console Logging with Emoji

 6 years ago
source link: https://github.com/ines/console-dot-emoji
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Custom Console Logging with Emoji

Debugging JavaScript can be painful and often means spending hours looking at boring console logs. Inspired by console.frog by Tim Holman, I made my own console logger — but with customizable commands and emojis. Logging to the console is finally fun again, thanks to console.beer beer and console.unicorn unicorn.

Go here to read the blog post and see it in action.

Example

Simply include console.emoji.js in your project or copy/past/adapt the code.

// Logging to the console
console.unicorn("So magical!");

// Output
🦄  So magical!

License

Published under the MIT license. Inspired by and adapted from console.frog by Tim Holman.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK