@lunarisapp/hyphen 0.0.6 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,15 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@lunarisapp/hyphen)
|
|
4
4
|
[](https://www.npmjs.com/package/@lunarisapp/hyphen)
|
|
5
|
-
[](https://github.com/LunarisApp/text-tools/actions/workflows/checks.yml)
|
|
6
6
|
|
|
7
7
|
A hyphenation library based on [LibreOffice dictionaries](https://git.libreoffice.org/dictionaries), inspired by [pyphen](https://github.com/Kozea/Pyphen).
|
|
8
8
|
|
|
9
9
|
> [!TIP]
|
|
10
10
|
> See also:
|
|
11
|
+
> - [@lunarisapp/language](https://github.com/LunarisApp/text-tools/tree/main/packages/language) for core linguistic breakdown: vowels, consonants, words, and sentences.
|
|
11
12
|
> - [@lunarisapp/stats](https://github.com/LunarisApp/text-tools/tree/main/packages/stats) for text statistics (e.g. word count, sentence count, etc.).
|
|
12
13
|
> - [@lunarisapp/readability](https://github.com/LunarisApp/text-tools/tree/main/packages/readability) for text readability scores (e.g. Flesch Reading Ease).
|
|
13
14
|
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- Browser & Node.js support
|
|
18
|
+
- Multi-language support
|
|
19
|
+
- TypeScript support
|
|
20
|
+
|
|
14
21
|
## Installation
|
|
15
22
|
|
|
16
23
|
```bash
|
|
@@ -23,9 +30,9 @@ npm install @lunarisapp/hyphen
|
|
|
23
30
|
import { TextHyphen } from '@lunarisapp/hyphen';
|
|
24
31
|
|
|
25
32
|
const textHyphen = new TextHyphen({
|
|
26
|
-
lang: 'en_US',
|
|
27
|
-
left: 2,
|
|
28
|
-
right: 2,
|
|
33
|
+
lang: 'en_US', // optional, en_US by default
|
|
34
|
+
left: 2, // optional, 2 by default
|
|
35
|
+
right: 2, // optional, 2 by default
|
|
29
36
|
});
|
|
30
37
|
|
|
31
38
|
// Gets the textHyphenation points for a word.
|