Collection of utility functions wrapped around emojis supported by Windows. Built with emoji data from winmojilib package.
npm install winemoji
import { emojis } from 'winemoji';
emojis
/*
[
{
char: 'π',
group: 'smileys-emotion',
hexcode: '1F600',
keywords: ['face', 'grin', 'grinning face'],
name: 'grinning_face',
subgroup: 'face-smiling'
}, ...
]
*/
import { Groups } from 'winemoji';
Groups
/*
{
AnimalsAndNature = 'animals-nature',
SmileysAndEmotion = 'smileys-emotion',
FoodAndDrink = 'food-drink',
...
}
*/
import { Subgroups } from 'winemoji';
Subgroups
/*
{
Drink = 'drink',
Clothing = 'clothing',
HairStyle = 'hair-style',
...
}
*/
import { resolveEmoji } from "winemoji";
resolveEmoji("frog")
resolveEmoji("πΈ")
resolveEmoji("1F438")
/*
{
char: 'πΈ',
group: 'animals-nature',
hexcode: '1F438',
keywords: ['animal', 'face', 'frog'],
name: 'frog_face',
subgroup: 'animal-amphibian'
}
*/
import { getRandomEmoji } from "winemoji";
getRandomEmoji()
/*
{
char: 'π',
keywords: [ 'purple', 'purple heart' ],
name: 'purple_heart',
group: 'smileys-emotion',
hexcode: '1F49C',
subgroup: 'emotion'
}
*/
import { getSimilarEmojis } from "winemoji";
getSimilarEmojis("π³")
/*
[
{
emoji: {
char: 'π₯',
...
},
similarity: 0.4
},
{
emoji: {
char: 'π₯',
...
},
similarity: 0.2
},
{
emoji: {
char: 'π₯―' ,
...
},
similarity: 0.2
},
...
]
*/
import { getRandomSimilarEmoji } from "winemoji";
getRandomSimilarEmoji("π³")
/*
{
emoji: {
char: 'π₯',
...
},
similarity: 0.4
}
*/
import { getEmojisMatchingKeyword } from "winemoji";
getEmojisMatchingKeyword("ball")
/*
[
{
char: 'β½',
...
},
{
char: 'βΎ',
...
},
{
char: 'π₯' ,
...
},
...
]
*/
import { getEmojisMatchingKeywords } from "winemoji";
getEmojisMatchingKeywords(["chocolate","bar"])
/*
[
{
char: 'π«',
keywords: [ 'bar', 'chocolate', 'dessert', 'sweet' ],
name: 'chocolate_bar',
group: 'food-drink',
hexcode: '1F36B',
subgroup: 'food-sweet'
}
]
*/
import { getEmojisFromGroup, Groups } from "winemoji";
getEmojisFromGroup(Groups.AnimalsAndNature);
/*
[
{
char: 'π΅',
...
},
{
char: 'π',
...
},
{
char: 'π¦',
...
},
...
]
*/
import { getEmojisFromSubgroup, Subgroups } from "winemoji";
getEmojisFromSubgroup(Subgroups.Music);
/*
[
{
char: 'πΌ',
...
},
{
char: 'π΅',
...
},
{
char: 'πΆ',
...
},
...
]
*/