Export emoticons list as an object with emoji id
parent
a51626ae79
commit
e15e5e5bd8
|
@ -3,7 +3,7 @@ import data from '../../data'
|
||||||
|
|
||||||
import {getSanitizedData} from '.'
|
import {getSanitizedData} from '.'
|
||||||
|
|
||||||
var emoticonsList = []
|
var emoticonsList = {}
|
||||||
|
|
||||||
var index = lunr(function() {
|
var index = lunr(function() {
|
||||||
this.pipeline.reset()
|
this.pipeline.reset()
|
||||||
|
@ -20,8 +20,8 @@ for (let emoji in data.emojis) {
|
||||||
{ short_name, name, emoticons } = emojiData
|
{ short_name, name, emoticons } = emojiData
|
||||||
|
|
||||||
for (let emoticon of emoticons) {
|
for (let emoticon of emoticons) {
|
||||||
if (emoticonsList.indexOf(emoticon) == -1) {
|
if (!emoticonsList[emoticon]) {
|
||||||
emoticonsList.push(emoticon)
|
emoticonsList[emoticon] = short_name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue