1
0
mirror of https://github.com/comatory/fb2iCal synced 2024-12-28 17:30:51 +01:00
Facebook-Events-iCal-Converter/lib/ics.js

17 lines
279 B
JavaScript
Raw Normal View History

2019-10-15 22:45:03 +02:00
const ics = require('ics')
const generateICS = async(data) => {
return new Promise((resolve, reject) => {
2019-10-17 22:14:08 +02:00
ics.createEvent(data, (err, value) => {
2019-10-15 22:45:03 +02:00
if (err) {
reject(err)
return
}
resolve(value)
})
})
}
module.exports = generateICS