Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let compact = require('emojibase-data/en/compact.json');
let groupMetaData = require('emojibase-data/meta/groups.json');
const fs = require('fs');
const emojiArray = [];
for (let i = 0; i < compact.length; i++) {
let emojiGroupFound = emojiArray.find(emojiGroup => emojiGroup.group === compact[i].group);
let emojiGroup = {};
if (emojiGroupFound !== undefined) {
emojiGroup = emojiGroupFound;
} else {
emojiGroup = { group: compact[i].group, emojiList: [] };
}
let emojiObj = { unicode: compact[i].unicode, /* tags: compact[i].tags */ };
if (compact[i].skins !== undefined) {
emojiObj.skins = [];
for (let j = 0; j < compact[i].skins.length; j++) {
emojiObj.skins.push({
unicode: compact[i].skins[j].unicode,
/* tags: compact[i].skins[j].tags */