FEAT: pii

This commit is contained in:
marcos-silva-rodrigues
2025-04-29 14:00:23 -03:00
parent 7a6db36554
commit 58e3c7be94
12 changed files with 883 additions and 59 deletions
+16
View File
@@ -0,0 +1,16 @@
import { readFileSync } from 'fs';
import Handlebars from 'handlebars';
export class HtmlParser<T> {
constructor(private readonly templatePath: string) {}
parse(data: T[]) {
const templateSource = readFileSync(this.templatePath, 'utf8');
const template = Handlebars.compile(templateSource);
return template({
dados: data,
dataGeracao: new Date().toLocaleString('pt-BR'),
});
}
}