npm.io
1.0.5 โ€ข Published 6 years ago

findemo

Licence
MIT
Version
1.0.5
Deps
0
Size
4 kB
Vulns
0
Weekly
0

findEmo

JavaScript library to find emoji in given String.

Installing

Install the package with the following command

npm i findemo

Usage

var findemo = require("findemo");
 // to find emoji from given string.
findemo.findEmoji("The tiny, emotive charactersโ€”from ๐Ÿ˜œ to ๐ŸŽ‰ to ๐Ÿ’ฉโ€”represent the first language born of the digital world");

// find UTF charactor for an emoji.
findemo.emoToUtf("๐Ÿ•‘");  // output : 1f551

// To find Emoji from UTF charactor
findemo.utfToEmo("1f551");  // output : ๐Ÿ•‘
Result

The result of findEmoji() will be in the following format

{
  emos: [
    { position: [Array], emoChar: '๐Ÿ˜œ', utf: '1f61c' },
    { position: [Array], emoChar: '๐ŸŽ‰', utf: '1f389' },
    { position: [Array], emoChar: '๐Ÿ’ฉ', utf: '1f4a9' }
  ]
}

Keywords