/
githubmirror
/
hyper
Обзор
Документация
Войти
/
githubmirror
/
hyper
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
3.0.2
lib/utils/notify.js
11 строк
339 B
Sonny
Adding ability to send error object to notify() (#2955)
02 май 2018, 11:10
02 май 2018, 11:10
f64e3e0
Код
Авторство
О чём код?
/* global Notification */ /* eslint no-new:0 */ export default function notify(title, body, details = {}) { //eslint-disable-next-line no-console console.log(`[Notification] ${title}: ${body}`); if (details.error) { //eslint-disable-next-line no-console console.error(details.error); } new Notification(title, {body}); }