@anio-js-foundation/str-colorize

2.1.0 • Public • Published

@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))

Readme

Keywords

none

Package Sidebar

Install

npm i @anio-js-foundation/str-colorize

Weekly Downloads

4

Version

2.1.0

License

MIT

Unpacked Size

6.55 kB

Total Files

3

Last publish

Collaborators

  • exory2024
  • dasdeo