mirror of
https://github.com/comatory/fb2iCal
synced 2024-12-12 08:36:10 +01:00
21 lines
357 B
JavaScript
21 lines
357 B
JavaScript
const ics = require('ics')
|
|
|
|
const generateICS = async(data) => {
|
|
return new Promise((resolve, reject) => {
|
|
ics.createEvent({
|
|
...data,
|
|
startInputType: 'utc',
|
|
endInputType: 'utc',
|
|
}, (err, value) => {
|
|
if (err) {
|
|
reject(err)
|
|
return
|
|
}
|
|
|
|
resolve(value)
|
|
})
|
|
})
|
|
}
|
|
|
|
module.exports = generateICS
|