Get current battery level
$ npm install battery-level
const batteryLevel = require('battery-level');
(async () => {
console.log(await batteryLevel());
//=> 0.55
})();
Returns a Promise<number>
with the battery level.
- battery-level-cli - CLI for this module
- browser-battery - Get battery information in a browser
- is-charging - Find out if a computer is charging