UNPKG

893 BMarkdownView Raw
1## umoji
2๐Ÿ˜€A lib convert emoji unicode to Surrogate pairs
3> u can use with npm
4```
5npm install umoji --save
6```
7#### method
8* emojiToUnicode
9> emoji to Surrogate pairs unicode
10```js
11umoji.emojiToUnicode('๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€sdksk');// return '\ud83d\ude00\ud83d\ude00\ud83d\ude00\ud83d\ude00\ud83d\ude00sdks'
12```
13* toSurrogatePairs
14> Hexadecimal and decimal number to unicode
15```js
16umoji.toSurrogatePairs(128513)// return '\ud83d\ude01'
17umoji.toSurrogatePairs(0x1F601)// return '\ud83d\ude01'
18```
19* fromcodepoint
20> a static method like es6 fromcodepoint, fromcodepoint() then use String.fromCodePoint(),
21```js
22fromcodepoint()
23String.fromCodePoint(128513)// return '\ud83d\ude01'
24```
25
26
27๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ ๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง ๐Ÿ‘จโ€๐Ÿ‘ฆ ๐Ÿ‘จโ€๐Ÿ‘ง ๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ ๐Ÿ‘จโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ ๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ง    A lot of people star this project