Last active
May 18, 2017 06:06
-
-
Save beaugunderson/7ae89d3576c18a2f056c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var fs = require('fs'); | |
console.log('retrieving unicode table...'); | |
request.get('http://unicode.org/emoji/charts/full-emoji-list.html', function (err, response, body) { | |
console.log('loading data...'); | |
var $ = cheerio.load(body); | |
var emoji = $('td.chars').map(function () { | |
return $(this).text(); | |
}).toArray(); | |
console.log('writing file...'); | |
fs.writeFile('./emoji.json', JSON.stringify(emoji, null, 2), function (err) { | |
console.log('done'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment