Chalk 5 is ESM. If you want to use Chalk with TypeScript or a build tool, you will probably want to use Chalk 4 for now. Chalk comes with an easy to use composable API where you just chain and nest the styles you want. Chain styles and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that chalk.red.yellow.green is equivalent to chalk.green. Color support is automatically detected, but you can override it by setting the level property. You should however only do this in your own code as it applies globally to all Chalk consumers. Detect whether the terminal supports color. Used internally and handled for you, but exposed for convenience. chalkStderr contains a separate instance configured with color support detected for stderr stream instead of stdout. Override rules from supportsColor apply to this too. supportsColorStderr is exposed for convenience.

Features

  • Expressive API
  • Highly performant
  • No dependencies
  • Ability to nest styles
  • Auto-detects color support
  • 256/Truecolor color support

Project Samples

Project Activity

See All Activity >

Categories

Terminals, Design

License

MIT License

Follow Chalk

Chalk Web Site

Other Useful Business Software
Build Securely on Azure with Proven Frameworks Icon
Build Securely on Azure with Proven Frameworks

Lay a foundation for success with Tested Reference Architectures developed by Fortinet’s experts. Learn more in this white paper.

Moving to the cloud brings new challenges. How can you manage a larger attack surface while ensuring great network performance? Turn to Fortinet’s Tested Reference Architectures, blueprints for designing and securing cloud environments built by cybersecurity experts. Learn more and explore use cases in this white paper.
Download Now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Chalk!

Additional Project Details

Operating Systems

Windows

Programming Language

JavaScript

Related Categories

JavaScript Terminals, JavaScript Design Software

Registered

2022-05-11