import notifier from 'node-notifier';

/**
 * Sends a cross-platform native notification.
 *
 * Wraps around node-notifier to assign default values.
 *
 * @param {string|object} options         - The notification options or a message.
 * @param {string}        options.title   - The notification title.
 * @param {string}        options.message - The notification message.
 * @param {string}        options.icon    - The notification icon.
 */
export default function notification(options) {
    if (typeof options === 'string') {
        options = {
            message: options
        };
    } else if (!options.title && !options.message) {
        throw new TypeError(
            'Notification expects at least a \'message\' parameter'
        );
    }

    if (typeof options.icon === 'undefined') {
        options.icon = 'https://user-images.githubusercontent.com/4596862/54868065-c2aea200-4d5e-11e9-9ce3-e0013c15f48c.png';
    }

    notifier.notify(options);
};

@@ -151,24 +151,25 @@
 *%0A * @param 
+ 
 %7Bstring%7Cobje
@@ -231,32 +231,33 @@
 sage.%0A * @param 
+ 
 %7Bstring%7D        
@@ -300,32 +300,33 @@
 itle.%0A * @param 
+ 
 %7Bstring%7D        
@@ -379,16 +379,17 @@
  @param 
+ 
 %7Bstring%7D
@@ -437,16 +437,106 @@
 n icon.%0A
+ * @param  %7Bfunction%7D      callback        - The notification callback.%0A * @return %7Bvoid%7D%0A
  */%0Aexpo
@@ -575,16 +575,26 @@
 (options
+, callback
 ) %7B%0A    
@@ -1032,24 +1032,335 @@
 ng';%0A    %7D%0A%0A
+    // If notification does not use a callback,%0A    // shorten the wait before timing out.%0A    if (typeof callback === 'undefined') %7B%0A        if (typeof options.wait === 'undefined') %7B%0A            if (typeof options.timeout === 'undefined') %7B%0A                options.timeout = 5;%0A            %7D%0A        %7D%0A    %7D%0A%0A
     notifier
@@ -1374,14 +1374,24 @@
 (options
+, callback
 );%0A%7D;%0A

Improve notification.js