discord-emojis-parser

1.0.6 • Public • Published

discord-emojis-parser package

This package is used to parse discord unicode emojis from a text, with name, svg image

Example: Using Unicodes

const EmojiParser=require('discord-emojis-parser');

let text=`Hello world 🌍!
I'm alone here? 😭`

console.log(EmojiParser.parse(text))
// Output
// [
//   {
//     name: 'earth_africa',
//     svg: 'https://discord.com/assets/..svg',
//     unicode: '🌍',
//     representation: 'earth_africa'
//   },
//   {
//     name: 'sob',
//     svg: 'https://discord.com/assets/..svg',
//     unicode: '😭',
//     representation: 'sob'
//   }
// ]

Example: Using Represenatives

const EmojiParser=require('discord-emojis-parser');

let text=`Hello world :earth_africa:!
I'm alone here? :sob:`

console.log(EmojiParser.parse(text))
// Output
// [
//   {
//     name: 'earth_africa',
//     svg: 'https://discord.com/assets/....svg',
//     unicode: '🌍',
//     representation: 'earth_africa'
//   },
//   {
//     name: 'sob',
//     svg: 'https://discord.com/assets/....svg',
//     unicode: '😭',
//     representation: 'sob'
//   }
// ]

Package Sidebar

Install

npm i discord-emojis-parser

Weekly Downloads

53

Version

1.0.6

License

ISC

Unpacked Size

658 kB

Total Files

6

Last publish

Collaborators

  • nervn