src/http/download.js
/**
 * Save list of posts to a CSV file
 */
Save list of posts to a CSV file
Save list of posts to a CSV file
async function toCSV(posts, filePath) {
    const parser = new json2csv.Parser({ flatten: true });
    const csv = parser.parse(posts);
    fs.writeFileSync(filePath, csv);
}
async function toCSV ( posts , filePath ) { const parser = new json2csv . Parser ( { flatten : true } ) ; const csv = parser . parse ( posts ) ; fs . writeFileSync ( filePath , csv ) ; }
Save list of posts to a CSV file
Save list of posts to a CSV file