https://github.com/maxlath/unicode-scripts-finder
find which unicode scripts a text is using
https://github.com/maxlath/unicode-scripts-finder
detection script scripts unicode
Last synced: 11 months ago
JSON representation
find which unicode scripts a text is using
- Host: GitHub
- URL: https://github.com/maxlath/unicode-scripts-finder
- Owner: maxlath
- Created: 2020-07-18T12:50:13.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-11-30T14:49:01.000Z (about 2 years ago)
- Last Synced: 2025-02-18T20:45:21.367Z (12 months ago)
- Topics: detection, script, scripts, unicode
- Language: JavaScript
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# unicode-scripts-finder
> There are 143,859 characters, with Unicode 13.0, covering 154 modern and historical scripts, as well as multiple symbol sets [[wikipedia: List of Unicode characters](https://en.wikipedia.org/wiki/List_of_Unicode_characters)]
Find which unicode scripts a text is using.
Status: WIP but already somewhat useful
## Install
To use the JS module in a project:
```sh
npm i unicode-scripts-finder
```
To use the CLI, rather install it globally to make the command `unicode-scripts-finder` available in your `$PATH`:
```sh
npm i -g unicode-scripts-finder
```
## Module
```js
const unicodeScriptsFinder = require('unicode-scripts-finder')
unicodeScriptsFinder('Lorem ipsum dolor sit amet')
// => [ { label: 'Latin', count: 370 } ]
unicodeScriptsFinder('ἀπόστασις')
// => [ { label: 'Greek', count: 9 } ]
unicodeScriptsFinder('Lorem ipsum ἀπόστασις')
// => [ { label: 'Latin', count: 10 }, { label: 'Greek', count: 9 } ]
```
## CLI
```sh
unicode-scripts-finder Lorem ipsum dolor sit amet
# => [
# {
# "label": "Latin",
# "count": 22
# }
# ]
```