1.0.2 • Published 10 years ago

battery-remaining v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

battery-remaining

Dependency Status

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

Example

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

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

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

Installation

$ npm install battery-remaining

API

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.

1.0.2

10 years ago

1.0.1

11 years ago

1.0.0

11 years ago