Find out if a computer is charging
$ npm install --save is-charging
const isCharging = require('is-charging');
isCharging().then(result => {
console.log(result);
//=> true
});
Returns a promise that resolves in to a Boolean
.
- is-charging-cli - CLI for this module
- battery-level - Get current battery level
- browser-battery - Get and watch battery information in a browser
MIT © Andreas Gillström