JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 301428
  • Score
    100M100P100Q170398F
  • License MIT

4x times faster than chalk and use 5x less space in node_modules

Package Exports

  • nanocolors
  • nanocolors/package.json

Readme

Nano Colors

A tiny and fast Node.js library to ANSI colors to terminal output.

Started as a fork of @jorgebucaran’s colorette with hacks from @lukeed’s kleur. See changes between Nano Colors and colorette.

  • It is 4 times faster than chalk for simple use cases.
  • No dependencies. It takes 5 times less space in node_modules than chalk.
  • Actively maintained. Used in many big projects like PostCSS or Browserslist.
  • Auto-detects color support. You can also toggle color mode manually.
  • Tree-shakable. We use a dual ESM/CJS package.
  • Supports Node.js ≥ 6 and universal Node.js/browser projects.
import { green, bold } from 'nanocolors'

console.log(
  green(`Task ${bold('1')} was finished`)
)

Nano Colors output

Sponsored by Evil Martians

Docs

Read full docs on GitHub.