Skip to content

Seperate a package for segment matching #100

@cometkim

Description

@cometkim

unicode-segmenter/emoji and unicode-segmenter/general only work for a single codepoint, and they're not actually about Unicode segmentation.

Technically speaking, the unicode-segmenter library provides a practical way to determine whether a codepoint is Extended_Pictographic or not, but it cannot determine whether it matches the definition of a Unicode Emoji exactly.

Most browsers support the Unicode sets feature for matching by Unicode properties. And specifically for emoji, most are not a single code point.

It requires /\p{RGI_Emoji}/v, or if not supported, another library like rgi-emoji-regex-pattern.

Like other Unicode features, some embedded runtimes might not support Unicode sets, so libraries are still helpful, but there's no reason for it to be part of unicode-segmenter library.

I plan to create a separate library that matches Unicode properties and migrate the functionality of unicode-segmenter/emoji and unicode-segmenter/general into it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions