3.0.0 • Published 7 months ago

battery-rate v3.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 months ago

battery-rate

Get a battery's (dis)charge rate. Probably only works on Linux.

Example

const batteryRate = require('battery-rate');

batteryRate('BAT1', (error, rate) => {
  if (error) {
    throw error;
  }

  console.log(rate);
  // => -9.106
});

Installation

$ npm install battery-rate

API

const battery-rate = require('battery-rate');

battery-rate([battery='BAT0'], callback)

Calls callback(error, rate), where error is any Error encountered and Number rate is the current rate of charge/discharge in watts of String battery (which defaults to 'BAT0').

3.0.0

7 months ago

2.0.1

11 months ago

2.0.0

11 months ago

1.0.4

8 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago