main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@โฆ>, 2 weeks ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
982 bytes
|
Rev | Line | ย |
---|
[79a0317] | 1 | text-segmentation
|
---|
| 2 | ==============
|
---|
| 3 |
|
---|
| 4 | ![CI](https://github.com/niklasvh/text-segmentation/workflows/CI/badge.svg?branch=main)
|
---|
| 5 | [![NPM Downloads](https://img.shields.io/npm/dm/text-segmentation.svg)](https://www.npmjs.org/package/text-segmentation)
|
---|
| 6 | [![NPM Version](https://img.shields.io/npm/v/text-segmentation.svg)](https://www.npmjs.org/package/text-segmentation)
|
---|
| 7 |
|
---|
| 8 | A JavaScript library for Grapheme Breaking and identifying Grapheme Boundaries, [implementing the Unicode Line Breaking Algorithm (UAX #29)](https://unicode.org/reports/tr29/)
|
---|
| 9 |
|
---|
| 10 | ### Installing
|
---|
| 11 | You can install the module via npm:
|
---|
| 12 |
|
---|
| 13 | npm install text-segmentation
|
---|
| 14 |
|
---|
| 15 | ### Example
|
---|
| 16 | ```javascript
|
---|
| 17 | import {splitGraphemes} from 'text-segmentation';
|
---|
| 18 |
|
---|
| 19 | const graphemes = splitGraphemes('Hello ๐จโ๐ฉโ๐งโ๐ฆ!');
|
---|
| 20 | ```
|
---|
| 21 |
|
---|
| 22 | ### Testing
|
---|
| 23 | You can run the test suite with:
|
---|
| 24 |
|
---|
| 25 | npm test
|
---|
| 26 |
|
---|
| 27 | The library implements all the [GraphemeBreakTest.txt tests](https://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakTest.txt).
|
---|
Note:
See
TracBrowser
for help on using the repository browser.