ics-to-json icon indicating copy to clipboard operation
ics-to-json copied to clipboard

Improve error reporting for wrong usage

Open Masterxilo opened this issue 5 years ago • 0 comments

const  icsToJson = require('ics-to-json').default
icsToJson()

gives

TypeError: Cannot read property 'split' of undefined
    at icsToJson (/home/runner/node_modules/ics-to-json/dist.js:32:23)

instead of something like "ics-to-json/icsToJson requires one string argument, no arguments where provided".

Masterxilo avatar Aug 06 '19 08:08 Masterxilo