is-unicode-supported 1.0.1
Install from the command line:
Learn more about npm packages
$ npm install @flex-development/is-unicode-supported@1.0.1
Install via package.json:
"@flex-development/is-unicode-supported": "1.0.1"
About this version
check whether unicode is supported in the terminal and browser
This is a small, but useful, library for detecting unicode support in the terminal and browser consoles.
- browser friendly
- no dependencies
- typescript support
This package is ESM only.
In Node.js with yarn:
yarn add @flex-development/is-unicode-supported
See Git - Protocols | Yarn for details regarding installing from Git.
In Deno with esm.sh
:
import { isUnicodeSupported } from 'https://esm.sh/@flex-development/is-unicode-supported'
In browsers with esm.sh
:
<script type="module">
import { isUnicodeSupported } from 'https://esm.sh/@flex-development/is-unicode-supported'
</script>
import isUnicodeSupported from '@flex-development/is-unicode-supported'
console.log(isUnicodeSupported())
This package exports the identifier isUnicodeSupported
.
The default export is also isUnicodeSupported
.
Check if Unicode is supported.
This can be useful to decide whether to use Unicode characters or fallback ASCII characters.
👉 Note: The function assumes all non-Windows terminals support Unicode and browsers that can correctly render
'✓'
(U+2713
) also support unicode. Windows terminals with unicode support are checked against a hardcoded list.
(boolean
) true
if unicode is supported, false
otherwise
This package is fully typed with TypeScript.
See CONTRIBUTING.md
.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.
Details
- is-unicode-supported
-
flex-development
- 3 months ago
- BSD-3-Clause
- 39 dependencies
Assets
- is-unicode-supported-1.0.1.tgz
Download activity
- Total downloads 9
- Last 30 days 0
- Last week 0
- Today 0