@qso-soft/shared
Version:
Shared library for QSO-soft
18 lines • 936 B
JavaScript
export const msgToTemplateTransform = (msg, templateData) => {
if (!templateData) {
return msg;
}
const { id, moduleName, action, address, status, txId } = templateData;
const templateString = [];
id && templateString.push(`[${id}]`);
address && templateString.push(`[${address.slice(0, 5)}...${address.slice(-5)}]`);
moduleName && templateString.push(`[${moduleName}]`);
action && templateString.push(`[${action}]`);
txId && templateString.push(`[TX: №${txId}]`);
status && templateString.push(`[${status}]`);
msg && templateString.push(`- ${msg}`);
return templateString.join(' ');
};
export const getSavedCheckersMessage = (projectName) => `Results saved to src/_output/csv/checkers/${projectName}.csv`;
export const getFileNameWithPrefix = (projectName, fileName) => `${projectName === 'evm' ? '' : projectName + '-'}${fileName}`;
//# sourceMappingURL=msg-to-template.js.map