0.1.1 β€’ Published 3 months ago

unicode_segmentation v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Unicode Segmentation

This library provides node binding for rust package Unicode Segmentation Crate

Installation

npm install -s unicode-segmentation

Usage

import { graphemes } from "unicode_segmentation";

const stringToSplit = "Lorem πŸ˜‚πŸ˜‚ ipsum πŸ•΅οΈβ€β™‚οΈdolor adipiscingπŸ˜‡πŸ˜‡πŸ€™ elit, sed do eiusmodπŸ₯° tempor πŸ˜€πŸ˜€πŸ³οΈβ€πŸŒˆ."

const result = graphemes(stringToSplit)

console.log(result);
/* Output
[
  'L',  'o',  'r',  'e',   'm', ' ', 'πŸ˜‚', 'πŸ˜‚',
  ' ',  'i',  'p',  's',   'u', 'm', ' ',  'πŸ•΅οΈβ€β™‚οΈ',
  'd',  'o',  'l',  'o',   'r', ' ', 'a',  'd',
  'i',  'p',  'i',  's',   'c', 'i', 'n',  'g',
  'πŸ˜‡', 'πŸ˜‡', 'πŸ€™', ' ',   'e', 'l', 'i',  't',
  ',',  ' ',  's',  'e',   'd', ' ', 'd',  'o',
  ' ',  'e',  'i',  'u',   's', 'm', 'o',  'd',
  'πŸ₯°', ' ',  't',  'e',   'm', 'p', 'o',  'r',
  ' ',  '😀', '😀', 'πŸ³οΈβ€πŸŒˆ', '.'
]
*/

This library exposes all functions from the Unicode Segmentation Crate. For more detailed documentation please visit this link

0.1.1

3 months ago

0.1.0

3 months ago