Back to directory
crayon-js avatar

crayon

πŸ–οΈ Terminal styling done light and fast.. Read more below about its uses, features, and usage.

Clone repository

git clone https://github.com/crayon-js/crayon.git

57

Stars

0

Forks

1

Watchers

MIT

License

deno github workflow

Crayon logo: Totally not creppy humanized crayon staring and waving hand at you

πŸ–οΈ Crayon

πŸ“š About

Crayon is a terminal styling module written in TypeScript.
From the ground up its goals are to be fast, relatively lightweight and modular.

πŸ–οΈ Crayon.js offers:

  • ⚑ Great performance
  • πŸ“¦ No dependencies
  • πŸ—‘οΈ Modularity (use what you need)
  • 🧐 Familiar API (chalk-like)
  • πŸ¦„ Built-in color fallbacking
    • 🎨 Automatic color detection via @crayon/color-support extension package
  • πŸ”— Support for nesting & chaining styles
  • πŸͺ’ Not extending String.prototype
  • 🌈 24bit (16.7mln -Β truecolor) and 8bit (256 - highcolor) color support

βš™οΈ Usage

import crayon from "@crayon/crayon";

console.log(crayon.red("its red!"));

🀝 Contributing

Crayon is open for any contributions.
If you feel like you can enhance this project - please open an issue and/or pull request.
Code should be well document and easy to follow what's going on.

Crayon 4.x follows conventional commits.
If your pull request's code could introduce understandability trouble, please add comments to it.

πŸ“ Licensing

This project is available under MIT License conditions.

Releases

Dec 3, 2022

Crayon 3.3.3

Download .zip

Improvements

Crayon now uses more efficient way to re-cache styles when colorSupport value changes

It makes caching a lot faster (>240x faster) – look benchmark on the bottom This also reduces memor...

Jul 12, 2022

Crayon 3.3.2

Download .zip

Improvements

Crayon now has a new logo, crayon-js organization new profile picture and crayon repository new social preview Improved naming of some variables so that they make more sense Added Chalk...

Jul 5, 2022

Crayon 3.3.1

Download .zip

Improvements

Introduced usesFunc property to Crayon instance

It indicates whether Crayon instance used mapped function, if so - prevent further caching of this instance.

Bug fixes

Behaviour impr...

Jul 3, 2022

Crayon 3.3.0

Download .zip

Improvements

Badges should now be correctly displayed on deno.land/x README now contains information about usage and extensions Crayon styles now dynamically respond to prototype.colorSupport changes...

Jun 29, 2022

Crayon 3.2.0

Download .zip

Improvements

Extensions now have their own README's Documented things that weren't Tests have been improved Main repository now has coverage and raw size badges that are stored under badges/ hex() er...