1.1.0 • Published 11 months ago

sharpyy v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

sharpyy

Discord npm npm Read the Docs npm type definitions wakatime node-current GitHub commit activity (branch)

Because chalk does not work in windows terminals...

Highlights

  • Fast
  • Lightweight
  • Easy to use
  • Customizable
  • TypeScript Types
  • ESM & CJS support
  • Works on all machines
  • No dependencies

Install

npm install sharpyy

How-To-Use

import { Style } from 'sharpyy'

// Anything passed after the first argument is a style. You can combine every style available.
sharpyy(text:string, ...style:Array<keyof typeof Style | Style>)

// Style is an enum and you can pass both a string value as well as a enum key.

Usage

// ESM
import sharpyy from 'sharpyy';

console.log(sharpyy('Hello, World!', 'invisible'));

// Use tx<Colorname> for text color.
console.log(sharpyy('Hello, World!', 'txBlue'));

// Use bg<Colorname> for background color.
console.log(sharpyy('Hello, World!', 'bgBlue'));

// It does not stop at colors...
console.log(sharpyy('Hello, World!', 'strikethrough'));

console.log(sharpyy('Hello, World!', 'underline'));

console.log(sharpyy('Hello, World!', 'italic'));

console.log(sharpyy('Hello, World!', 'dim'));

// combine multiple effects
console.log(sharpyy('Hello, World!', 'txRed', 'bold', 'underline', 'inverse'));

// You like rainbows?
console.log(sharpyy('Hello, World!', 'txRainbow', 'bold', 'underlines', 'italic'));

console.log(sharpyy('Hello, World!', 'bgRainbow', 'bold', 'underlines', 'italic'));

output

// CJS
const { default: sharpyy } = require('sharpyy');

console.log(sharpyy('Hello, World!', 'invisible'));

// Use tx<Colorname> for text color.
console.log(sharpyy('Hello, World!', 'txBlue'));

// Use bg<Colorname> for background color.
console.log(sharpyy('Hello, World!', 'bgBlue'));

// It does not stop at colors...
console.log(sharpyy('Hello, World!', 'strikethrough'));

console.log(sharpyy('Hello, World!', 'underline'));

console.log(sharpyy('Hello, World!', 'italic'));

console.log(sharpyy('Hello, World!', 'dim'));

// combine multiple effects
console.log(sharpyy('Hello, World!', 'txRed', 'bold', 'underline', 'inverse'));

// You like rainbows?
console.log(sharpyy('Hello, World!', 'txRainbow', 'bold', 'underlines', 'italic'));

console.log(sharpyy('Hello, World!', 'bgRainbow', 'bold', 'underlines', 'italic'));

output

Styles

  • normal
  • bold
  • dim
  • italic
  • underline
  • inverse
  • invisible
  • strikethrough
  • underlines

Text Colors

  • txGray
  • txRed
  • txGreen
  • txYellow
  • txBlue
  • txMagenta
  • txCyan
  • txWhite
  • txRainbow

Background Colors

  • bgGray
  • bgRed
  • bgGreen
  • bgYellow
  • bgBlue
  • bgMagenta
  • bgCyan
  • bgWhite
  • bgRainbow
1.1.0

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago