GitShow/sindresorhus/is-unicode-supported
sindresorhus

is-unicode-supported

Detect whether the terminal supports Unicode

by sindresorhus
Star on GitHubForknpm

JavaScript

86 stars9 forks5 contributorsQuiet · 1y agoSince 2021v2.1.0MIT

Meet the team

See all 5 on GitHub →
sindresorhus
sindresorhus15 contributions
ehmicky
ehmicky2 contributions
guilhermetod
guilhermetod1 contribution
mataha
mataha1 contribution

Languages

View on GitHub →
JavaScript91.4%
TypeScript8.6%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
SulmaneDev
Refactor Unicode Support Detection for Improved Platform CompatibilityMergedPR

Summary: This PR refactors the isUnicodeSupported function to improve its readability, efficiency, and platform compatibility checks. The updated code makes it easier to manage and extend terminal emulator checks, ensuring more accurate detection of Unicode support across different environments. Changes: Platform-Specific Checks: Simplified the logic for detecting Unicode support by handling non-Windows and Windows platforms separately. Windows Terminal Support: Grouped Windows terminal emulator checks into concise boolean expressions for clarity. Terminal List Refactoring: Used an array to store known terminal types, making it more maintainable when adding/removing terminal checks. Code Readability: Enhanced code readability with early returns, clear variable naming, and logical grouping of conditions. Why This Change: Improved Maintainability: The refactor allows for easier additions or modifications of supported terminal types in the future. Cleaner Logic: The separation of platform-specific checks ensures a more structured and efficient flow in the code. Cross-Platform Reliability: Enhances Unicode support detection on various environments, particularly for Windows-based terminal emulators. Testing: Verified functionality across multiple platforms (Windows, macOS, Linux) to ensure correct behavior. Ensured backwards compatibility with existing terminal environments.

SulmaneDev · 1y ago
Mouvedia
Add support for rxvt-unicodeClosedIssue

If you are using cygwin, would return . https://github.com/sindresorhus/is-unicode-supported/blob/506f27260df3636555714bf10ed40ab9e6a6c96e/index.js#L4 Hence rxvt-unicode under cygwin would be detected as not supporting Unicode. i.e. === or

Mouvedia · 1y ago
idleberg
add support for Warp terminalMergedPR

Warp is a relatively new terminal for macOS and Linux. Thought you might want to support it.

idleberg · 2y ago
Structured data for AI agents

Repository: sindresorhus/is-unicode-supported. Description: Detect whether the terminal supports Unicode Stars: 86, Forks: 9. Primary language: JavaScript. Languages: JavaScript (91.4%), TypeScript (8.6%). License: MIT. Latest release: v2.1.0 (1y ago). Open PRs: 0, open issues: 0. Last activity: 1y ago. Community health: 85%. Top contributors: sindresorhus, ehmicky, guilhermetod, mataha.

·@ofershap

Replace github.com with gitshow.dev