Update emoji-data
parent
f8165922b5
commit
ba2f76b24f
|
@ -27,7 +27,7 @@
|
||||||
"babel-loader": "6.2.4",
|
"babel-loader": "6.2.4",
|
||||||
"babel-preset-es2015": "6.6.0",
|
"babel-preset-es2015": "6.6.0",
|
||||||
"babel-preset-react": "6.5.0",
|
"babel-preset-react": "6.5.0",
|
||||||
"emoji-data": "git://github.com/missive/emoji-data.git#01aeccb3adf6cdfaab6e13892f7688740047ff32",
|
"emoji-data": "git://github.com/iamcal/emoji-data.git#6daffc10d8e8fd06b80ec24c9bdcb65218f71563",
|
||||||
"inflection": "1.10.0",
|
"inflection": "1.10.0",
|
||||||
"lunr": "0.7.1",
|
"lunr": "0.7.1",
|
||||||
"mkdirp": "0.5.1",
|
"mkdirp": "0.5.1",
|
||||||
|
|
|
@ -24,14 +24,6 @@ emojiData.forEach((datum) => {
|
||||||
shortName = datum.short_name,
|
shortName = datum.short_name,
|
||||||
categoryIndex
|
categoryIndex
|
||||||
|
|
||||||
if (!category) {
|
|
||||||
if (/^skin/.test(shortName)) category = 'Skins'
|
|
||||||
if (/^flag/.test(shortName)) category = 'Flags'
|
|
||||||
if (/^(left_speech_bubble|keycap_star|eject)$/.test(shortName)) category = 'Symbols'
|
|
||||||
|
|
||||||
datum.category = category
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!datum.category) {
|
if (!datum.category) {
|
||||||
throw new Error('“' + datum.short_name + '” doesn’t have a category')
|
throw new Error('“' + datum.short_name + '” doesn’t have a category')
|
||||||
}
|
}
|
||||||
|
@ -43,7 +35,7 @@ emojiData.forEach((datum) => {
|
||||||
throw new Error('“' + datum.short_name + '” doesn’t have a name')
|
throw new Error('“' + datum.short_name + '” doesn’t have a name')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (datum.category == 'Skins') {
|
if (datum.category == 'Skin Tones') {
|
||||||
data.skins[datum.short_name] = datum
|
data.skins[datum.short_name] = datum
|
||||||
} else {
|
} else {
|
||||||
categoryIndex = categoriesIndex[category]
|
categoryIndex = categoriesIndex[category]
|
||||||
|
|
Loading…
Reference in New Issue