Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wahaha2012/console-emoji-log
show console logs with emoji
https://github.com/wahaha2012/console-emoji-log
cli console emoji log
Last synced: about 1 month ago
JSON representation
show console logs with emoji
- Host: GitHub
- URL: https://github.com/wahaha2012/console-emoji-log
- Owner: wahaha2012
- License: mit
- Created: 2021-09-30T08:08:35.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-30T09:52:40.000Z (over 3 years ago)
- Last Synced: 2024-12-19T18:03:49.784Z (about 1 month ago)
- Topics: cli, console, emoji, log
- Language: JavaScript
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# console-emoji-log
show console logs with emoji## Usage
```bash
yarn add console-emoji-log
npm install console-emoji-log
``````js
// 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)
```js
console.setConfig({
// change log prefix
prefix: "->",// change emoji settings
emoji: {
log: "👉",
},
});console.log("log"); // 👉 -> log
console.success("success"); // ✅ -> success
``````js
console.setConfig({
// turn emoji icon off
useEmoji: false,// clear log prefix
prefix: "",
});
console.log("log"); // log
console.success("success"); // success
```