Prefer first variation over default unified value

nolan/hinaloe-test
Etienne Lemay 2017-02-17 12:22:01 -05:00
parent 44d401ae48
commit 489641bda6
1 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,10 @@ emojiData.forEach((datum) => {
datum.name || (datum.name = datum.short_name.replace(/\-/g, ' '))
datum.name = inflection.titleize(datum.name || '')
if (datum.variations && datum.variations.length) {
datum.unified = datum.variations.shift()
}
if (datum.category == 'Flags') {
datum.name = datum.name.replace(/\s(\w+)$/, (letters) => letters.toUpperCase())
}