Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-unicode-supported

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-unicode-supported - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

23

index.js
import process from 'node:process';
export default function isUnicodeSupported() {
const {env} = process;
const {TERM, TERM_PROGRAM} = env;
if (process.platform !== 'win32') {
return process.env.TERM !== 'linux'; // Linux console (kernel)
return TERM !== 'linux'; // Linux console (kernel)
}
return Boolean(process.env.WT_SESSION) // Windows Terminal
|| Boolean(process.env.TERMINUS_SUBLIME) // Terminus (<0.2.27)
|| process.env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder
|| process.env.TERM_PROGRAM === 'Terminus-Sublime'
|| process.env.TERM_PROGRAM === 'vscode'
|| process.env.TERM === 'xterm-256color'
|| process.env.TERM === 'alacritty'
|| process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
return Boolean(env.WT_SESSION) // Windows Terminal
|| Boolean(env.TERMINUS_SUBLIME) // Terminus (<0.2.27)
|| env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder
|| TERM_PROGRAM === 'Terminus-Sublime'
|| TERM_PROGRAM === 'vscode'
|| TERM === 'xterm-256color'
|| TERM === 'alacritty'
|| TERM === 'rxvt-unicode'
|| TERM === 'rxvt-unicode-256color'
|| env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
}
{
"name": "is-unicode-supported",
"version": "2.0.0",
"version": "2.1.0",
"description": "Detect whether the terminal supports Unicode",

@@ -18,2 +18,3 @@ "license": "MIT",

},
"sideEffects": false,
"engines": {

@@ -43,6 +44,6 @@ "node": ">=18"

"devDependencies": {
"ava": "^5.3.1",
"tsd": "^0.29.0",
"xo": "^0.56.0"
"ava": "^6.1.3",
"tsd": "^0.31.2",
"xo": "^0.59.3"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc