Skip to content

Commit 443721e

Browse files
committed
+ readme
1 parent 3ab4c93 commit 443721e

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
11
# unicode-scripts-finder
22

3-
find which unicode scripts a text is using
3+
Find which unicode scripts a text is using
4+
5+
Status: WIP but already somewhat useful
6+
7+
## Install
8+
To use the JS module in a project:
9+
```sh
10+
npm i unicode-scripts-finder
11+
```
12+
13+
To use the CLI, rather install it globally to make the command `unicode-scripts-finder` available in your $PATH:
14+
```sh
15+
npm i -g unicode-scripts-finder
16+
```
17+
18+
## Module
19+
```js
20+
const unicodeScriptsFinder = require('unicode-scripts-finder')
21+
22+
unicodeScriptsFinder('Lorem ipsum dolor sit amet')
23+
24+
[ { label: 'Latin', count: 370 }
25+
]
26+
27+
unicodeScriptsFinder('ἀπόστασις').should.deepEqual([
28+
{ label: 'Greek', count: 9 }
29+
])
30+
31+
unicodeScriptsFinder('Lorem ipsum ἀπόστασις').should.deepEqual([
32+
{ label: 'Latin', count: 10 },
33+
{ label: 'Greek', count: 9 }
34+
])
35+
```
36+
37+
## CLI
38+
```sh
39+
unicode-scripts-finder Lorem ipsum dolor sit amet
40+
```

0 commit comments

Comments
 (0)