db-vendo-client/parse/icon.js
Kristjan ESPERANTO 66d9fb5194
apply linting rules
follow-up of 228c7253
2024-02-10 16:50:12 +01:00

20 lines
279 B
JavaScript

const parseIcon = (ctx, i) => {
if (i.res === 'Empty') {
return null;
}
const res = {
type: i.res || null,
title: i.text || i.txt || i.txtS || null,
};
if (i.fg) {
res.fgColor = i.fg;
}
if (i.bg) {
res.bgColor = i.bg;
}
return res;
};
export {
parseIcon,
};