Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
if (title) {
options['title'] = title;
}
options['text'] = text;
if (timeout) {
options['delay'] = timeout;
}
if (icon) {
options['icon'] = icon;
}
// notification showing
const notification = new PNotify(options);
// console logging
if (type === 'error') {
console.error(title + ': ' + text);
} else {
console.log(title + ': ' + text);
}
return notification;
}