console-chan
v0.2.1
Published
Log random anime ASCII art to the browser console
Maintainers
Readme
console-chan
A zero-dependency package with optional React bindings that logs anime-themed ASCII art to the console.

Install
npm i console-chanQuick start
import { logConsoleArt } from "console-chan";
logConsoleArt({ append: "https://mysite.com" });In Node.js, output is plain text without color styling.
Options
LogOptions {
color: hex string (Default: "#8b5cf6"),
fontSize: string (Default: 18px),
taglineFontSize: string (Default: 14px),
frequency: "once" | "navigate" (Default: "once"),
append: string (optional)
}Once logs once on the console and navigate logs on navigation in your SPA.
API
logConsoleArt(options?: LogOptions)
Logs a random art piece + tagline to console. In Node, outputs plain text (no color styling).
getRandomArt(): string
Returns a random art string from the bank.
getRandomTagline(): string
Returns a random tagline string.
CONSOLE_ART: string[]
The full array of art pieces.
TAGLINES: string[]
The full array of taglines.
React usage
import { ConsoleArt } from "console-chan/react";
function App() {
return <ConsoleArt />;
}Or use the hook
import { useConsoleArt } from "console-chan/react";
function App() {
useConsoleArt({ color: "#ff0000" });
return <div>...</div>;
}Contributing
Go to CONTRIBUTING.md
MIT license
