is-unicode-supported
Advanced tools
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" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 6 instances in 1 package
3958
28
1