is-unicode-supported
Detect whether the terminal supports Unicode
Last updated a year ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install is-unicode-supported 
SYNC missed versions from official npm registry.

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.

Related

Current Tags

  • 2.0.0                                ...           latest (a year ago)

6 Versions

  • 2.0.0                                ...           a year ago
  • 1.3.0                                ...           2 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.0                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)
Dependents (3)

Copyright 2013 - present © cnpmjs.org | Home |