felt-pen
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

felt-pen

Tiny ANSI terminal coloring library

Benchmarks

Calling

chalk          1,192,251 ops/sec
cli-color        130,947 ops/sec
ansi-colors      683,415 ops/sec
kleur          1,352,980 ops/sec
kleur/colors   1,383,478 ops/sec
colorette      1,503,513 ops/sec
felt-pen       1,414,047 ops/sec
nanocolors     1,530,478 ops/sec

Loading

chalk         13.964 ms
cli-color     98.851 ms
ansi-colors    3.832 ms
kleur          7.182 ms
kleur/colors   1.469 ms
colorette      2.221 ms
felt-pen       1.424 ms
nanocolors     2.494 ms

Size

chalk         101 kB
cli-color    1249 kB
ansi-colors    25 kB
kleur          21 kB
colorette      16 kB
felt-pen        9 kB
nanocolors     16 kB

Install

yarn add felt-pen

Usage

import * as pen from 'felt-pen'

console.log( pen.blue( `Hello, ${pen.bold( 'World' )}!!!` ) )

See the demo (mjs, cjs) for all supported ansi attributes.

Compatibility

Github Actions

GitHub have broken TTY. As workaround, set default shell in your workflow or job or run as in example:

defaults:
  run:
    shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'

Readme

Keywords

none

Package Sidebar

Install

npm i felt-pen

Weekly Downloads

5

Version

2.0.1

License

MIT

Unpacked Size

10.2 kB

Total Files

12

Last publish

Collaborators

  • jin