Facebook-Events-iCal-Converter/lib/services/ics-generator.js

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