hyper/lib/utils/notify.js

11 lines
313 B
JavaScript
Raw Normal View History

2016-07-08 10:48:24 -08:00
/* eslint no-new:0 */
export default function notify(title, body, details = {}) {
//eslint-disable-next-line no-console
2016-07-13 12:44:24 -08:00
console.log(`[Notification] ${title}: ${body}`);
if (details.error) {
//eslint-disable-next-line no-console
console.error(details.error);
}
new Notification(title, {body});
2016-07-08 10:48:24 -08:00
}