mirror of
https://github.com/array-in-a-matrix/public-apis.git
synced 2025-04-02 11:11:50 -04:00
11 lines
246 B
JavaScript
11 lines
246 B
JavaScript
const fs = require('fs')
|
|
|
|
module.exports = async function ({ data, filePath }) {
|
|
await fs.writeFile(filePath, data, error => {
|
|
if (error) {
|
|
throw new Error(`Error writing to file: ${error}`)
|
|
}
|
|
})
|
|
|
|
return
|
|
}
|