Skip to content

vijhhh2/unicode-segmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published