1.0.0 โ€ข Published 3 years ago

@devsnowflake/text-emoji-parser v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

Text Emoji Parser

Simple JavaScript library to parse emojis from the given text. This package is based on twemoji-parser.

Example

const { parse } = require("@devsnowflake/text-emoji-parser");
const entities = parse("Hello ๐Ÿ˜€ I ๐Ÿงก Emojis ๐Ÿค—");

console.log(entities);

/*
[
    {
        indices: [ 6, 8 ],
        text: '๐Ÿ˜€',
        type: 'emoji',
        unicode: '1f600'
    },
    {
        indices: [ 11, 13 ],
        text: '๐Ÿงก',
        type: 'emoji',
        unicode: '1f9e1'
    },
    {
        indices: [ 21, 23 ],
        text: '๐Ÿค—',
        type: 'emoji',
        unicode: '1f917'
    }
]
*/