Package Exports
- strcolorize
- strcolorize/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (strcolorize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
🎨 strcolorize
strcolorize is a lightweight package for coloring text using ANSI codes, perfect for adding visual style to terminal outputs. There are already several string coloring modules out there, but strcolorize is different in how it operates.
Most utilize functions or string prototypes to colorize your string, but strcolorize uses inline formatting (applies text formatting styles directly within the text line) to colorize your texts. You can see some examples below.
🎈 How to usage?
Here you will see some examples of how to use this package.
import colorize from 'strcolorize'; // module esm
const colorize = require('strcolorize'); // module commonjs
colorize('This word is [red and bold](red bold)')
colorize('This text is [green and italic](green italic)')
colorize('This is two word [red](red) and [green](green)')
Terminal output:
✨ Colors and Styles
text colors
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- white
- gray
styles
- reset
- bold
- italic
- underline
- inverse
- hidden
- strikethrough