Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gillstrom/battery-level

Get current battery level
https://github.com/gillstrom/battery-level

battery battery-level javascript node

Last synced: 3 days ago
JSON representation

Get current battery level

Awesome Lists containing this project

README

        




battery-level




> Get current battery level

## Install

```
$ npm install battery-level
```

## Usage

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

(async () => {
console.log(await batteryLevel());
//=> 0.55
})();
```

## API

### batteryLevel()

Returns a `Promise` with the battery level.

## Related

* [battery-level-cli](https://github.com/gillstrom/battery-level-cli) - CLI for this module
* [browser-battery](https://github.com/gillstrom/browser-battery) - Get battery information in a browser
* [is-charging](https://github.com/gillstrom/is-charging) - Find out if a computer is charging