/battery-level

Get current battery level

Primary LanguageJavaScriptMIT LicenseMIT


battery-level

Get current battery level

Install

$ npm install battery-level

Usage

const batteryLevel = require('battery-level');

batteryLevel().then(level => {
	console.log(level);
	//=> 0.55
});

CLI

$ npm install --global battery-level
$ battery-level --help

  Usage
    $ battery-level
    55%

Related

License

MIT © Andreas Gillström