Update Flags name with uppercase letters
parent
75535b7a30
commit
b192563535
File diff suppressed because one or more lines are too long
|
@ -31,6 +31,10 @@ emojiData.forEach((datum) => {
|
||||||
datum.name || (datum.name = datum.short_name.replace(/\-/g, ' '))
|
datum.name || (datum.name = datum.short_name.replace(/\-/g, ' '))
|
||||||
datum.name = inflection.titleize(datum.name || '')
|
datum.name = inflection.titleize(datum.name || '')
|
||||||
|
|
||||||
|
if (datum.category == 'Flags') {
|
||||||
|
datum.name = datum.name.replace(/\s(\w+)$/, (letters) => letters.toUpperCase())
|
||||||
|
}
|
||||||
|
|
||||||
if (!datum.name) {
|
if (!datum.name) {
|
||||||
throw new Error('“' + datum.short_name + '” doesn’t have a name')
|
throw new Error('“' + datum.short_name + '” doesn’t have a name')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue