mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-08 05:29:08 +00:00
REFACTOR: create builder for parser reporterand fix pdf
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { stringify } from 'csv'
|
||||
import { Parser } from './parser.interface';
|
||||
|
||||
export class CsvParser<T> {
|
||||
export class CsvParser<T> implements Parser<T>{
|
||||
async parse(data: T[]) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise<string>((resolve, reject) => {
|
||||
stringify(data, { header: true }, function (err, output) {
|
||||
if (err) reject(err);
|
||||
console.log(output)
|
||||
|
||||
resolve(output)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user