node-notifier
Advanced tools
Changelog
v4.0.0
Major changes and breaking API.
var notifier = require('node-notifier');
notifier.notify();
wait
property (default false
), to get user input for
Notification Center, Windows Toaster, Windows Balloons and Growl. Sadly not
for notify-send.var notifier = require('node-notifier');
notifier.notify({ wait: true }, function (err, response) {
// response is response after user have interacted
// with the notification or the notification has timed out.
});
click
or timeout
. This is only applicable if { wait: true }
.var notifier = require('node-notifier');
notifier.on('click', function (notificationObject, options) {
// options.someArbitraryData === 'foo'
});
notifier.notify({ wait: true, someArbitraryData: 'foo' });
{ sound: true }
.
Default NotificationCenter sound is Bottle. Can still use define sound on
Mac:var notifier = require('node-notifier');
notifier.notify({ sound: true });
// For mac (same as sound: true on Windows 8)
notifier.notify({ sound: 'Morse' });
Changelog
v3.3.0