adamgibbons / ics

iCalendar (ics) file generator for node.js
ISC License
732 stars 155 forks source link

Callbacks and errors #239

Closed BaptisteMartinet closed 1 year ago

BaptisteMartinet commented 1 year ago

Why does the createEvent/createEvents functions take callbacks as argument? wouldn't it be easier if the function returned the string directly? Also why does the function not throw errors instead of returning an error object? isn´t it the purpose of thowing errors?

adamgibbons commented 1 year ago

These were design decisions made early on that worked for my purposes.