rauschma / openurl

Node.js module for opening a URL via the operating system
71 stars 19 forks source link

Added promises / add options for error handling #11

Open lufinkey opened 5 years ago

lufinkey commented 5 years ago

I made it so that if a callback isn't passed, a promise will be returned.

I also fixed your handling of the error in the end event. It's usually better to handle errors rather than throwing them. The options argument lets you silence error logging.