Closed IonicaBizau closed 8 years ago
Obviously, for now I will just delete emoji.keys
:sparkle: But would be handy not to be there at all.
I added keys
to provide an ordered list of emojis (in order of category & it's position within a category). Object.keys
returns an unordered array, instead of the order it appears in the JSON file. :pensive: I know it's weird and unideal but I don't see a way around it.
Maybe namespace it somehow, then? A suggestion would be to take out the keys
array from emojis.json
and put it into keys.json
and in the js side to do:
module.exports = {
emojis: require("./emojis")
, keys: require("./keys")
};
Would make the things smoother. :grin:
Yup that totally make sense.
@muan Can I create pull request with this change?
Do we we really need the
keys
array? It can be easily obtained usingObject.keys(emoji)
. :thought_balloon:Currently I causes some trouble because I want to check if a word is emoji, so
emoji[myWord]
will fail formyWord === "keys"
(it's not an emoji object but an array).Looks like it's anyway causing some problems on the Emoji Searcher page:
I'm almost sure there is no
:keys:
aliased with:-1:
but it's just an issue because of thekeys
object.So, is the
keys
array really needed? I would vote to be removed. :balloon: