UNPKG

user-console

Version:

User Console for console with colors, emojis, and pretty logs.

55 lines (37 loc) 1.42 kB
## Description **`user-console`** is an elegant and colorful logging utility for Node.js developers. It adds emojis and styles to standard `console.log` calls, making debugging easier and visually intuitive. Ideal for CLI tools, backend apps, or any project where you want more expressive logs. ## Installation ```bash # Using npm npm install user-console # Using yarn yarn add user-console # Using pnpm pnpm add user-console ``` ## Usage ```js // Simple log userConsole('This is an info message.'); // Log with level userConsole('Everything is working perfectly!', 'success'); userConsole('This is a warning', 'warn'); userConsole('An error occurred', 'error'); userConsole('Debugging data', 'debug'); ``` ### Output Example ```bash ℹ️ → This is an info message ← ℹ️ ✅ → Everything is working perfectly! ← ✅ ⚠️ → This is a warning ← ⚠️ ❌ → An error occurred ← ❌ 🐞 → Debugging data ← 🐞 ``` ## API ### `userConsole(message, level)` | Parameter | Type | Description | |-----------|----------|----------------------------------------------| | `message` | `string` | The log message to print | | `level` | `string` | The log level (`info`, `success`, `warn`, `error`, `debug`) | - If no level is provided, it defaults to `info`. - Emojis and colors are applied automatically based on the level.