Skip to content

wahaha2012/console-emoji-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

console-emoji-log

show console logs with emoji

Usage

yarn add console-emoji-log
npm install console-emoji-log
// use as commonjs
const console = require("console-emoji-log");
// use as ES module
// import console from "console-emoji-log";

console.log("log"); // ⚪️ => log
console.info("info"); // 🔵 => info
console.warn("warn"); // 🟡 => warn
console.error("error"); // 🔴 => error
console.success("success"); // ✅ => success 

Custom Setting

console.setConfig(options)

console.setConfig({
  // change log prefix
  prefix: "->", 

  // change emoji settings
  emoji: {
    log: "👉",
  },
});

console.log("log");  // 👉 -> log
console.success("success"); // ✅ -> success
console.setConfig({
  // turn emoji icon off
  useEmoji: false,

  // clear log prefix
  prefix: "",
});
console.log("log"); // log
console.success("success"); // success

About

show console logs with emoji

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published