In your command-line run the following commands:
brew doctor
brew update
const MainProcessNotification = require("electron").Notification; | |
const isRenderer = process && process.type === "renderer"; | |
const isSupported = () => isRenderer ? "Notification" in window : MainProcessNotification.isSupported(); | |
const renderNotify = (title, body) => { | |
const notification = new Notification(title, { | |
body: body | |
}); | |
return notification | |
}; | |
try { |
In your command-line run the following commands:
brew doctor
brew update
Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
/** | |
* Get a random floating point number between `min` and `max`. | |
* | |
* @param {number} min - min number | |
* @param {number} max - max number | |
* @return {number} a random floating point number | |
*/ | |
function getRandomFloat(min, max) { | |
return Math.random() * (max - min) + min; | |
} |