# battery-remaining

> Get the remaining charge in a battery

Latest version **1.0.2** (published 2016-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install battery-remaining
pnpm add battery-remaining
yarn add battery-remaining
bun add battery-remaining
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2016-04-10 |
| First published | 2014-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kenan Yildirim |
| Maintainers | kenan |
| Keywords | battery |

## Links

- npm: https://www.npmjs.com/package/battery-remaining
- Repository: https://github.com/kenany/battery-remaining
- Homepage: https://github.com/kenany/battery-remaining#readme
- Issues: https://github.com/kenany/battery-remaining/issues
- npm.io page: https://npm.io/package/battery-remaining

## Dependencies (3)

- [first-line](https://npm.io/package/first-line.md) ^1.0.1
- [battery-path](https://npm.io/package/battery-path.md) ^1.0.0
- [lodash.isfunction](https://npm.io/package/lodash.isfunction.md) ^3.0.8

## Recent versions

- 1.0.2 (latest) — 2016-04-10
- 1.0.1 — 2014-10-23
- 1.0.0 — 2014-10-23

## README

# battery-remaining

[![Dependency Status][gemnasium-svg]][gemnasium]

Get the remaining charge in a battery. Probably only works on Linux.

## Example

``` javascript
var batteryRemaining = require('battery-remaining');

batteryRemaining('BAT0', function(error, charge) {
  if (error) {
    throw error;
  }

  console.log(charge);
  // => 21.88
});
```

## Installation

``` bash
$ npm install battery-remaining
```

## API

``` javascript
var batteryRemaining = require('battery-remaining');
```

### `batteryRemaining([battery='BAT0'], callback)`

Calls `callback(error, remaining)`, where `error` is any _Error_ encountered
and _Number_ `remaining` is the charge remaining in _String_ `battery` in watts.


   [gemnasium]: https://gemnasium.com/KenanY/battery-remaining
   [gemnasium-svg]: https://img.shields.io/gemnasium/KenanY/battery-remaining.svg

---
_Source: https://npm.io/package/battery-remaining · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
