Skip to content

Commit

Permalink
Exclude flag-un from data
Browse files Browse the repository at this point in the history
I have yet to find a browser that supports it
  • Loading branch information
EtienneLem committed Sep 29, 2017
1 parent 274d8b3 commit 88cde66
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/build-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ emojiData.forEach((datum) => {
})

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:')
fs.writeFile('dist/data/data.js', `module.exports = ${stringified}`, (err) => {
Expand Down

0 comments on commit 88cde66

Please sign in to comment.