From 88cde669e63dcdb6e7a86bcdd0a44f9f0836c4b4 Mon Sep 17 00:00:00 2001 From: Etienne Lemay Date: Fri, 29 Sep 2017 19:35:21 -0400 Subject: [PATCH] Exclude flag-un from data I have yet to find a browser that supports it --- scripts/build-data.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/build-data.js b/scripts/build-data.js index 20330a5..dd9da0a 100644 --- a/scripts/build-data.js +++ b/scripts/build-data.js @@ -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) => {