ee/packages/pdf-worker/src/strategies/ChatTranscript.ts
Function parserMessages
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private parserMessages(messages: PDFMessage[], dateFormat: string, timeAndDateFormat: string, timezone: string): PDFMessage[] {
return messages.map((message, index, arr) => {
const previousMessage = arr[index - 1];
const { ts, ...rest } = message;
const formattedTs = moment(ts).tz(timezone).format(timeAndDateFormat);