A lightweight library that adds a
console.success()method for logging colored success messages with checkmark icons in both Node.js and browser environments.
- 🎨 Colored output with green styling and checkmark icons
- 🌐 Cross-platform - works in Node.js and browsers
- 📦 Tiny size - only 515 bytes (0.31 kB gzipped)
- 🚀 Zero dependencies - lightweight and fast
- 🔧 Easy to use - simple API, works out of the box
npm install console-successrequire('console-success');
console.success('Task completed successfully!');
console.success(new Date()); // Works with any data typeimport 'console-success';
console.success('Hello from the browser!');<script src="https://unpkg.com/console-success@latest/dist/index.js"></script>
<script>
console.success("Hello world!");
</script>// Basic usage
console.success('Operation completed');
// With different data types
console.success(42);
console.success({ status: 'success', data: 'example' });
console.success(['item1', 'item2', 'item3']);
// In async operations
async function fetchData() {
try {
const data = await api.getData();
console.success('Data fetched successfully');
return data;
} catch (error) {
console.error('Failed to fetch data');
}
}- Minified: 515 bytes
- Gzipped: 0.31 kB
- Dependencies: 0
# Install dependencies
npm install
# Run tests
npm run test
# Run E2E tests
npm run test:e2e
# Build
npm run build
# Run all tests
npm run test:allMIT © Tufan Tunç
