Shannon_mu 9ea635a2dc 停车场 2 年之前
..
dist 9ea635a2dc 停车场 2 年之前
CHANGELOG.md 9ea635a2dc 停车场 2 年之前
LICENSE 9ea635a2dc 停车场 2 年之前
README.md 9ea635a2dc 停车场 2 年之前
package.json 9ea635a2dc 停车场 2 年之前
rollup.config.ts 9ea635a2dc 停车场 2 年之前

README.md

text-segmentation

CI NPM Downloads NPM Version

A JavaScript library for Grapheme Breaking and identifying Grapheme Boundaries, implementing the Unicode Line Breaking Algorithm (UAX #29)

Installing

You can install the module via npm:

npm install text-segmentation

Example

import {splitGraphemes} from 'text-segmentation';

const graphemes =  splitGraphemes('Hello 👨‍👩‍👧‍👦!');

Testing

You can run the test suite with:

npm test

The library implements all the GraphemeBreakTest.txt tests.