@anio-js-foundation/str-colorize
v2.1.0
Published
Colorize a string.
Downloads
416
Readme
@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))