hyper/lib/utils/notify.js

12 lines
339 B
JavaScript
Raw Normal View History

2016-07-08 10:48:24 -08:00
/* global Notification */
/* eslint no-new:0 */
export default function notify(title, body, details = {}) {
2018-04-16 06:17:17 -08:00
//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
}