Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
default: color = '#ffcd4a'; break;
}
return color;
};
const buildData = equip => Object.assign(
equip,
{
buildTime: ((equip.fitGuns || equip.company === '16Lab') ? 0 : equip.buildTime),
color: getColor(equip.rank),
alias: equipAlias[equip.id] || [],
},
);
const equipMap = new Map(equips.map(e => [e.id, e]));
const getAll = () => {
const equipDict = {};
equipMap.forEach((e, id) => {
equipDict[id] = buildData(new Equip(e.toJSON()));
});
return equipDict;
};
const getNewById = (id) => {
const equip = equipMap.get(id);
if (!equip) { return null; }
return buildData(new Equip(equip.toJSON()));