UNPKG

379 BJavaScriptView Raw
1
2var growl = require('growl');
3
4
5
6module.exports = function(app) {
7 app.notify = function(msg, options, callback) {
8 if (!callback) callback = Function.prototype;
9 if (typeof options === 'string') options = { image: options };
10 if (!options) options = {};
11 if (!options.title) options.title = app.title || app.name;
12 return growl(msg, options, callback);
13 };
14};