Detalhes do pacote

picocolors

alexeyraspopov338.6mISC1.1.1

The tiniest and the fastest library for terminal output formatting with ANSI colors

terminal, colors, formatting, cli

readme (leia-me)

picocolors

The tiniest and the fastest library for terminal output formatting with ANSI colors.

import pc from "picocolors"

console.log(
  pc.green(`How are ${pc.italic(`you`)} doing?`)
)
  • No dependencies.
  • 14 times smaller and 2 times faster than chalk.
  • Used by popular tools like PostCSS, SVGO, Stylelint, and Browserslist.
  • Node.js v6+ & browsers support. Support for both CJS and ESM projects.
  • TypeScript type declarations included.
  • NO_COLOR friendly.

Docs

Read full docs on GitHub.

changelog (log de mudanças)

Changelog

v1.1.0

  • Added bright color variants (#55)

v1.0.1

  • Updated color detection mechanism to work properly on Vercel Edge Runtime (#64)
  • Remove use of recursion to avoid possible stack overflow for very long inputs (#56)

v1.0.0

  • Removed several code elements to reduce the package size (#31)
  • Fixed optional flag for createColors() in TypeScript typings (#34)

v0.2.1

  • Removed semicolons to reduce the package size (#28)
  • Fixed type definitions (#29)
  • Made createColors() use isColorSupported if no flag was provided (aaf57e1)

v0.2.0

  • Removed ESM Module to fix the rest of compatibility issues and reduce package size (#26)
  • Added support for non-string inputs (3276400)

v0.1.0

  • Added CommonJS support (#7)
  • Ensured Node.js 6+ support (#8)
  • Added Browsers support (#10)