supports-semigraphics
Determine if your terminal supports text animations.
Some environments try to simulate a TTY which can bugger up logs with your progress bar, character spinner, etc semigraphic animations.
Installation
Node.js >= 4
is required. To install, type this at the command line:
npm install supports-semigraphics
Usage
const supportsSemigraphics = ; if // the terminal probably has support for semigraphics
You can also check a specific stream:
;//-> false
Info
It obeys the --animation
and --no-animation
CLI flags.
For situations where using --animation
is not possible, add an environment variable FORCE_ANIMATION
with any value to force animations. Trumps --no-animation
.