The string contains the processor of Emoji
- 字符串中emoji替换unicode
- 修正字符串 只保留 中文 大小写英文字母 阿拉伯数字 小数点 emoji表情
$ npm i emoji-handle
const { emojiToUnicode } = require('emoji-handle');
const result = emojiToUnicode('李大猫😀');
console.log(result);
// output: 李大猫\\u{1F600}
const { repair } = require('emoji-handle');
const result = repair('佛系大宝宝🌟𐂂 ☾˚‧º·');
console.log(result);
// output: 佛系大宝宝
const { repair } = require('emoji-handle');
const result = repair('佛系大宝宝🌟𐂂 ☾˚‧º·', true);
console.log(result);
// output: 佛系大宝宝🌟