Windows terminal detection.
Currently supports: cmd
, cmder
, conemu
, powershell
, mingw
, and cygwin
.
npm install win-term
const term = require('win-term')
if (term)
console.log(term)
- returns
false
if the platform is not Windows orstdout
is not a TTY; else returns the name of the terminal, one of:'cmd'
,'cmder'
,'conemu'
,'powershell'
,'mingw'
, or'cygwin'
.
WTFPL – Do What the F*ck You Want to Public License.
Made with ❤️ by @MarkTiedemann.