1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-03 13:10:04 +00:00

feat: parse log to array

This commit is contained in:
Saad Jutt
2022-02-20 04:50:09 +05:00
parent 034f3173bd
commit c5ad72c931
6 changed files with 68 additions and 6 deletions

View File

@@ -0,0 +1,9 @@
export interface LogLine {
line: string
}
export const parseLogToArray = (content?: string): LogLine[] => {
if (!content) return []
return content.split('\n').map((line) => ({ line: line }))
}