Skip to content

Detect whether a terminal supports ANSI escape sequences

License

Notifications You must be signed in to change notification settings

keqingrong/supports-ansi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

supports-ansi

npm version

Detect whether a terminal supports ANSI escape sequences

Installation

npm install --save supports-ansi

Usage

const supportsAnsi = require('supports-ansi');

// on ANSI/VT100/xterm compatible terminal
console.log(supportsAnsi);
// => true

// on CMD/PowerShell (before Windows 10 v.1607)
console.log(supportsAnsi);
// => false

Note

Cygwin is not supported.

License

MIT

About

Detect whether a terminal supports ANSI escape sequences

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published