mirror of
https://github.com/iptv-org/api.git
synced 2025-05-12 18:10:07 -04:00
Added saveSync function
This commit is contained in:
parent
8139c2e528
commit
79fe222826
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,12 @@ csv.save = async function (filepath, data) {
|
||||||
return fs.writeFile(filepath, string)
|
return fs.writeFile(filepath, string)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
csv.saveSync = function (filepath, data) {
|
||||||
|
const string = json2csv.parse(data)
|
||||||
|
|
||||||
|
return fs.writeFileSync(filepath, string)
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = csv
|
module.exports = csv
|
||||||
|
|
||||||
function flattenArray(item) {
|
function flattenArray(item) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue