🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

trmclr

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trmclr

Terminal colors but easier

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
1
Maintainers
0
Weekly downloads
 
Created
Source

trmclr

Easy terminal colors.

Colors and helpers

bgBlack, bgBlue, bgBrightBlack, bgBrightBlue, bgBrightCyan, bgBrightGreen, bgBrightMagenta, bgBrightRed, bgBrightWhite, bgBrightYellow, bgCyan, bgGreen, bgMagenta, bgRed, bgRgb24, bgRgb8, bgWhite, bgYellow, black, blue, bold, brightBlack, brightBlue, brightCyan, brightGreen, brightMagenta, brightRed, brightWhite, brightYellow, cyan, dim, getColorEnabled, gray, green, hidden, inverse, italic, magenta, red, reset, strikethrough, stripColor, underline, white, yellow

Usage

import { cyan, bgMagenta } from 'trmclr';

console.log(cyan(bgMagenta('Some text')));

Enable or disable color

import { getColorEnabled, setColorEnabled } from 'trmclr';

setColorEnabled(true);
setColorEnabled(false);

getColorEnabled(); // → false

Remove colors and decorations

import { cyan, stripColor } from 'trmclr';

stripColor(cyan('Hi')); // → uncolored "Hi"

License

(c) 2022-2024 Romein van Buren. Licensed under the MIT license.

For the full copyright and license information, please see the LICENSE.md file that was distributed with this source code.

Original implementation: (c) 2018-2022 the Deno authors.

Smart Yellow

Keywords

color

FAQs

Package last updated on 09 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts