Export emoticons list as an object with emoji id

release
Etienne Lemay 2016-07-19 15:57:16 -04:00
parent a51626ae79
commit e15e5e5bd8
1 changed files with 3 additions and 3 deletions

View File

@ -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
} }
} }