Skip to content

Commit

Permalink
Don’t include keywords in data file
Browse files Browse the repository at this point in the history
These are only used to generate the search string, the library doesn’t need it.
  • Loading branch information
EtienneLem committed Mar 10, 2017
1 parent 41c9a2a commit dbf2207
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/build-data.js
Expand Up @@ -52,8 +52,6 @@ emojiData.forEach((datum) => {
keywords = emojiLib.lib[datum.short_name].keywords
}

datum.keywords = keywords

datum.search = []
var addToSearch = (strings, split) => {
(Array.isArray(strings) ? strings : [strings]).forEach((string) => {
Expand All @@ -69,7 +67,7 @@ emojiData.forEach((datum) => {

addToSearch(datum.short_names, true)
addToSearch(datum.name, true)
addToSearch(datum.keywords, false)
addToSearch(keywords, false)
addToSearch(datum.emoticons, false)

datum.search = datum.search.join(',')
Expand Down

0 comments on commit dbf2207

Please sign in to comment.