Skip to content
Get current battery level
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
media 🐩 May 25, 2015
.editorconfig Meta tweaks (#10) Sep 19, 2017
.gitattributes Fix typo in dotfile name (#12) Dec 5, 2018
.gitignore Meta tweaks (#10) Sep 19, 2017
.npmrc Meta tweaks (#10) Sep 19, 2017
index.js ES2015ify and support Node.js >=4 (#8) Aug 30, 2016
license Meta tweaks (#10) Sep 19, 2017
package.json v3.0.0 Sep 20, 2017
readme.md Extract CLI to its own module Sep 20, 2017
test.js Meta tweaks (#10) Sep 19, 2017

readme.md


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
});

Related

License

MIT © Andreas Gillström

You can’t perform that action at this time.