Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

is-unicode-supported

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Issues
File Explorer

Advanced tools

is-unicode-supported

Detect whether the terminal supports Unicode

    1.2.0latest

Version published
Maintainers
1
Weekly downloads
12,488,005
decreased by-3.5%

Weekly downloads

Changelog

Source

  • Add support for JetBrains' terminal (#11) 0f9c3bc

https://github.com/sindresorhus/is-unicode-supported/compare/v1.1.0...v1.2.0

Readme

Source

is-unicode-supported

Detect whether the terminal supports Unicode

This can be useful to decide whether to use Unicode characters or fallback ASCII characters in command-line output.

Note that the check is quite naive. It just assumes all non-Windows terminals support Unicode and hard-codes which Windows terminals that do support Unicode. However, I have been using this logic in some popular packages for years without problems.

Install

npm install is-unicode-supported

Usage

import isUnicodeSupported from 'is-unicode-supported'; isUnicodeSupported(); //=> true

API

isUnicodeSupported()

Returns a boolean for whether the terminal supports Unicode.

  • is-interactive - Check if stdout or stderr is interactive
  • supports-color - Detect whether a terminal supports color
  • figures - Unicode symbols with Windows fallbacks
  • log-symbols - Colored symbols for various log levels

Keywords

FAQs

What is is-unicode-supported?

Detect whether the terminal supports Unicode

Is is-unicode-supported popular?

The npm package is-unicode-supported receives a total of 11,966,901 weekly downloads. As such, is-unicode-supported popularity was classified as popular.

Is is-unicode-supported well maintained?

We found that is-unicode-supported demonstrated a healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 23 Mar 2022
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc