@modlin.dev/terminal
v1.1.0
Published
Terminal utilities for customization and more
Downloads
3
Maintainers
Readme
Terminal
JavaScript Libary that has Terminal Utilities like Logging, Chalk, Gradients, Prompt and more coming.
Installation
npm install @modlin.dev/terminal ## Node.js
bun add @modlin.dev/terminal ## Bun
Examples
// Logging
import { Logger } from "@modlin.dev/terminal/logger";
// Create own Logger
const logger = new Logger.Standard({ gap: ":" });
logger.log("Hello, world!"); // [12:30 PM] : Hello, world!
const server = new Logger.Server({ gap: ">" });
server.log("Hello, world!"); // 06/11/2024 12:30:00 PM > Hello, world!
// Or use default
import { logger, server } from "@modlin-dev/terminal/logger";
logger.log("Hello, world!"); // [12:30 PM] > Hello, world!
server.log("Hello, world!"); // 06/11/2024 12:30:00 PM - Hello, world!
// Chalk
import { Chalk } from "@modlin-dev/terminal/chalk";
// Use custom Colors
Chalk.Forground.RGB(215, 58, 73, "Hello, world!");
// Or use default
Chalk.Forground.Red("Hello, world!");
// And More