Skip to content

anio-js-foundation/str-colorize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@anio-js-foundation/str-colorize

Colorize a string.

import {c, print, stripStyles} from "@anio-js-foundation/str-colorize"

print(c.green("This is a green text\n"))
print(c.red("This is a green text\n"))
print(c.gray("This is gray text\n"))

print(
	c.green(
		`This is green text with ${c.yellow(`yellow in between`)}\n`
	)
)

print(
	c.green(
		`This is green text with ${c.yellow(`yellow and ${c.bold("bold")} in between`)}\n`
	)
)

const styled = c.green(
	`This is green text with ${c.yellow(`yellow and ${c.bold("bold")} in between`)}\n`
)

print(stripStyles(styled))