battery-percentage

1.0.0 • Public • Published

battery-percentage

Get current MacOS battery level

Works on macOS only.

Install

$ npm install --global battery-percentage

Usage

const batteryPercentage = require('battery-percentage')
 
batteryPercentage().then(percentage => {
  console.log(percentage)
})
// 36%
 
batteryPercentage({ verbose: true }).then(percentage => {
  console.log(percentage)
})
// 36%; charging; 3:36 remaining

Related

License

MIT © Andrea Amorosi

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i battery-percentage

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • dreamorosi