const visualizeNotes = (res) => { let response = res.body; let notes = response?.notes || {}; let responseRuntime = notes.runtime_sec || 0; notes.runtime = new Date(responseRuntime * 1000).toISOString().substr(11, 8); if (typeof response?.data === 'undefined' && typeof response?.rows === 'object') { response.data = response?.rows?.map(function (data) { return data?.values; }); } const templateScript = ` `; const mainScript = ` `; const style = ` `; const htmlString = ` ${style} ${templateScript} ${mainScript} `; return htmlString; }; module.exports = visualizeNotes;