is-unicode-supported (0.1.0)

Published 2026-02-24 13:58:43 +00:00 by atheaadmin

Installation

registry=
npm install is-unicode-supported@0.1.0
"is-unicode-supported": "0.1.0"

About this package

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

const isUnicodeSupported = require('is-unicode-supported');

isUnicodeSupported();
//=> true

API

isUnicodeSupported()

Returns a boolean for whether the terminal supports Unicode.

Dependencies

Development Dependencies

ID Version
ava ^2.4.0
tsd ^0.14.0
xo ^0.38.2

Keywords

terminal unicode detect utf8 console shell support supports supported check detection
Details
npm
2026-02-24 13:58:43 +00:00
1
Sindre Sorhus
MIT
latest
1.8 KiB
Assets (1)
Versions (1) View all
0.1.0 2026-02-24