Colored output
Green styling with a checkmark icon — ANSI codes in Node, CSS styles in the browser. Resets cleanly.
v1.1.1 · zero dependencies · ~880 bytes
console.success() prints green, checkmarked messages in your terminal
and your browser console. One line. Zero config. Cross-platform.
This runs the real console-success library loaded from the CDN.
Open your browser DevTools console to see the styled output, and watch it mirrored below.
Enter JavaScript values, comma-separated. Objects & arrays are supported.
Output appears here. Hit Run to call console.success().
💡 Also open DevTools → Console to see the styled, colored log rendered natively by your browser.
Pick your package manager. It's tiny, so installing is instant.
npm install console-success
pnpm add console-success
yarn add console-success
<script src="https://unpkg.com/console-success@latest/dist/index.js"></script>
Same API everywhere. Import once, call console.success() anywhere.
const 'console-success'; // attaches console.success
console.success('Task completed successfully!');
console.success(new Date()); // works with any data typeimport 'console-success';
console.success('Hello from the browser!');<!-- drop-in, no build step -->
<script src="https://unpkg.com/console-success@latest/dist/index.js"></script>
<script>
console.success('Hello world!');
</script>{"status":"ok"}) because styled logs can't render inspectable objects.
Node.js preserves full object formatting.
Small enough to forget about, useful enough to reach for every day.
Green styling with a checkmark icon — ANSI codes in Node, CSS styles in the browser. Resets cleanly.
One library, identical API for Node.js and the browser. Auto-detects its environment.
Roughly 880 bytes minified, ~0.47 kB gzipped. No runtime dependencies at all.
Import it once. console.success is globally available — no wrappers, no setup.
Handles null, undefined, functions, numbers and even circular references without crashing.
Unit tests (Vitest) and browser E2E tests (Playwright) keep both environments green.
npm install console-success