Exclude flag-un from data

I have yet to find a browser that supports it
nolan/hinaloe-test
Etienne Lemay 2017-09-29 19:35:21 -04:00
parent 274d8b3862
commit 88cde669e6
1 changed files with 5 additions and 1 deletions

View File

@ -134,7 +134,11 @@ emojiData.forEach((datum) => {
}) })
var flags = data.categories[categoriesIndex['Flags']] var flags = data.categories[categoriesIndex['Flags']]
flags.emojis.sort() flags.emojis = flags.emojis.filter((flag) => {
// Until browsers support Flag UN
if (flag == 'flag-un') return
return true
}).sort()
const stringified = JSON.stringify(data).replace(/\"([A-Za-z_]+)\":/g, '$1:') const stringified = JSON.stringify(data).replace(/\"([A-Za-z_]+)\":/g, '$1:')
fs.writeFile('dist/data/data.js', `module.exports = ${stringified}`, (err) => { fs.writeFile('dist/data/data.js', `module.exports = ${stringified}`, (err) => {