mirror of
https://github.com/comatory/fb2iCal
synced 2025-01-14 09:26:16 +01:00
17 lines
279 B
JavaScript
17 lines
279 B
JavaScript
const ics = require('ics')
|
|
|
|
const generateICS = async(data) => {
|
|
return new Promise((resolve, reject) => {
|
|
ics.createEvent(data, (err, value) => {
|
|
if (err) {
|
|
reject(err)
|
|
return
|
|
}
|
|
|
|
resolve(value)
|
|
})
|
|
})
|
|
}
|
|
|
|
module.exports = generateICS
|