scripts/scraping/utils.ts

15 lines
369 B
TypeScript
Raw Permalink Normal View History

2023-08-17 12:40:49 +02:00
import * as fs from "node:fs";
export default function WriteFile(fileName: string, fileContent: any) {
console.log('write file', fileName)
return fs.writeFile(
`./output/${fileName}`,
fileContent,
'utf8',
(err) => {
if (err) {
console.log(`Error writing file: ${err}`)
}
}
)
}