supports-ansi
Detect whether a terminal supports ANSI escape sequences
Installation
npm install --save supports-ansi
Usage
const supportsAnsi = ; // on ANSI/VT100 compatible terminalconsole;// => true // on CMD/PowerShell (before Windows 10 v.1607)console;// => false
Note
Cygwin is not supported.
License
MIT