Cross OS power-off.
$ npm install --save power-off
var powerOff = require('power-off');
powerOff( function (err, stderr, stdout) {
if(!err && !stderr) {
console.log(stdout);
}
});
$ npm install --global power-off
$ power-off
MIT © Hemanth.HM