4.3.2 • Published 5 years ago

healthi v4.3.2

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

healthi

Install

Right now it supports mac and linux:

npm install healthi

Usage

Healthi works with promises since version 2.0.0:

Example 1: await

const health = require('healthi')
const battery = await health()
console.log(battery.health) //=> 90.76078670529044

Example 2: then

const health = require('healthi')
health()
.then(console.log) //=> { currentCapacity: 5953,  originalCapacity: 6559,  health: 90.76078670529044 }
.catch(console.log)

Result

The battery object has 3 attributes:

{
  now,      // Example: 5953 mAh
  original, // Example: 6559 mAh
  health    // Example: 90.7 % (this is the current capacity compared to the original one)
}

Contribute

JavaScript Style Guide

Feel free to open an issue or a pull request

Author

me
© 2017 Pablo Varela
4.3.2

5 years ago

4.3.1

5 years ago

4.3.0

6 years ago

4.2.0

6 years ago

4.1.4

6 years ago

4.1.3

6 years ago

4.1.2

6 years ago

4.1.1

6 years ago

4.1.0

6 years ago

4.0.1

6 years ago

4.0.0

6 years ago

3.4.0

6 years ago

3.3.0

7 years ago

3.2.0

7 years ago

3.0.0

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago