2.0.1 • Published 2 years ago

felt-pen v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

felt-pen

Tiny ANSI terminal coloring library

npm.io

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}"'
2.0.1

2 years ago

2.0.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago