hyper/lib/utils/notify.ts

9 lines
262 B
TypeScript
Raw Normal View History

2016-07-08 10:48:24 -08:00
/* eslint no-new:0 */
2020-06-19 04:51:34 -08:00
export default function notify(title: string, body: string, details: {error?: any} = {}) {
2016-07-13 12:44:24 -08:00
console.log(`[Notification] ${title}: ${body}`);
if (details.error) {
console.error(details.error);
}
new Notification(title, {body});
2016-07-08 10:48:24 -08:00
}