tonic + npm: emoji-transmogrifier

node v8.17.0
version: 3.0.1
var transmogrifier = require("emoji-transmogrifier"); var beerEmojiUrl = transmogrifier.getImage('beer'); console.log('the url of the GitHub emoji image for beer is: ' + beerEmojiUrl); var beerUniStr = transmogrifier.getUnicode('beer'); console.log('the unicode string for beer is: ' + beerUniStr); // String.fromCodePoint was added in ES6, so it will work on node 4.x LTS or newer console.log('beers: ' + String.fromCodePoint(beerUniStr)); // country codes, flags, should parse a pair of unicode values console.log(String.fromCodePoint('0x1f1e6','0x1f1eb')); console.log(String.fromCodePoint('0x1f1fa','0x1f1f8'));

no comments

    sign in to comment