Update scripts

This commit is contained in:
freearhey
2023-09-15 18:40:35 +03:00
parent 1decbe7ac0
commit 94f473f7ca
98 changed files with 2423 additions and 1499 deletions

13
scripts/core/logParser.ts Normal file
View File

@@ -0,0 +1,13 @@
export type LogItem = {
filepath: string
count: number
}
export class LogParser {
parse(content: string): any[] {
if (!content) return []
const lines = content.split('\n')
return lines.map(line => (line ? JSON.parse(line) : null)).filter(l => l)
}
}