New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

beaut

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

beaut

An easy way to beautify terminals!🐲

latest
Source
npmnpm
Version
1.0.6
Version published
Maintainers
1
Created
Source

Beaut

Beaut Banner GitHub License npm

Github

A Small Library For NodeJS To Beautify Terminals!

How To Use

$ npm install beaut

BASIC USAGE

const beaut = require('beaut');
const styler = beaut.beaut

// Style Color: magenta 
console.log(styler("Hello World!",beaut.colornames.magenta))

If you're using visual studio code for this project, then you might get suggestions from the IntelliSense Suggestions

Inside bgColors, You can find background colors Inside decoration, You can set them as bold, underline, reversed

You can also create them as below

const beaut = require('beaut');
const styler = beaut.beaut

// Styles It With Background Cyan And Decoratates It With Bold
console.log(styler(styler("Hello World", beaut.bgColors.BgCyan), beaut.decoration.bold));

Output Above

Features Since 1.0.3

  • Added hsl,rgb,keyword and hex support
  • Added italic, strikethrough, hidden, dim to names.decoration
const beaut = require('beaut');
const styler = beaut.beaut

console.log(styler('It\'s Beaut!',beaut.decoration.bold));
console.log(styler('It\'s Beaut!',beaut.decoration.italic));
console.log(styler('It\'s Beaut!',beaut.decoration.underline));
console.log(styler('It\'s Beaut!',beaut.decoration.reversed));
console.log(styler('It\'s Beaut!',beaut.decoration.strikethrough));
console.log(styler('It\'s Beaut!',beaut.decoration.hidden));
console.log(styler('It\'s Beaut!',beaut.decoration.dim));

Output_Image

Using hsl, rgb, keyword And hex To Style Text!

const beaut = require('beaut');
const styler = beaut.beaut

console.log(styler('Bruh!',beaut.hex("32a8a4"))) // Do Not Use #
console.log(styler('Bruh!',beaut.hsl(321, 54, 55))) // Only Numbers
console.log(styler('Bruh!',beaut.rgb(202, 88, 78,bg=true))) // bg=true sets it as background
console.log(styler('Bruh!',beaut.keyword("purple",bg=true)))

Output_Image

Feature Since 1.0.5

  • Added states which can be used to set the state of the text
  • Added icons just like states
const beaut = require('beaut');
const styler = beaut.beaut
let state = beaut.state
console.log(styler('I\'m a info',state.info));
console.log(styler('Command Success!',state.sucess));
console.log(styler('Unexpected Error!',state.error));
console.log(styler('WARNING: YOU CAN\'T REDO CHANGES',state.warning));
console.log(styler('Text is being debugged',state.debug));

Output_Image

Using Icons

const beaut = require('beaut');

// Icons Can't Be Visible In Terminals Like Classic CMD Or Powershell
console.log(beaut.icons.info[0]);
console.log(beaut.icons.info[1]);
console.log(beaut.icons.warning)
console.log(beaut.icons.error)
console.log(beaut.icons.debug[0])
console.log(beaut.icons.debug[1])
console.log(beaut.icons.success)

Output_Image

VERSION 1.0.6

FIXED MODULE_NOT_FOUND ERROR color-convert

Keywords

colorize

FAQs

Package last updated on 02 Mar 2022

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