joypixels / emojione

[Archived] The world's largest independent emoji font. Maintained at https://github.com/joypixels/emoji-toolkit.
https://www.joypixels.com
Other
4.46k stars 535 forks source link

ascii To Unicode function #564

Closed fzp01717 closed 5 years ago

fzp01717 commented 6 years ago

Hello, i am working on nodejs. i have a query. is there any function is present name asciiToUnicode for ascii To Unicode convert. thanks

Davidc2525 commented 6 years ago

I did. you just have to do a new strategy and use it

import findWithRegex from 'find-with-regex'; import emojione from 'emojione';   //-----------------------------------------------------| use to RegExp by ascii const unicodeRegex = new RegExp (emojione.asciiRegexp, 'g');

export default (contentBlock: Object, callback: Function) => {    findWithRegex (unicodeRegex, contentBlock, callback); };