Remove unused fields from data
parent
03b7996fda
commit
8da2aa3744
File diff suppressed because one or more lines are too long
|
@ -64,6 +64,15 @@ emojiData.forEach((datum) => {
|
|||
data.categories[categoryIndex].emojis.push(datum.short_name)
|
||||
data.emojis[datum.short_name] = datum
|
||||
}
|
||||
|
||||
delete datum.docomo
|
||||
delete datum.au
|
||||
delete datum.softbank
|
||||
delete datum.google
|
||||
delete datum.image
|
||||
delete datum.short_name
|
||||
delete datum.category
|
||||
delete datum.sort_order
|
||||
})
|
||||
|
||||
var flags = data.categories[categoriesIndex['Flags']];
|
||||
|
|
|
@ -18,20 +18,21 @@ var index = lunr(function() {
|
|||
|
||||
for (let emoji in data.emojis) {
|
||||
let emojiData = data.emojis[emoji],
|
||||
{ short_name, name, emoticons } = emojiData
|
||||
{ short_names, name, emoticons } = emojiData,
|
||||
id = short_names[0]
|
||||
|
||||
for (let emoticon of emoticons) {
|
||||
if (!emoticonsList[emoticon]) {
|
||||
emoticonsList[emoticon] = short_name
|
||||
emoticonsList[emoticon] = id
|
||||
}
|
||||
}
|
||||
|
||||
emojisList[short_name] = getSanitizedData(short_name)
|
||||
emojisList[id] = getSanitizedData(id)
|
||||
|
||||
index.add({
|
||||
id: short_name,
|
||||
id: id,
|
||||
emoticons: emoticons,
|
||||
short_name: tokenize(short_name),
|
||||
short_name: tokenize(id),
|
||||
name: tokenize(name),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue