osx-battery

4.0.0 • Public • Published

osx-battery

Get information about your Battery

Install

$ npm install --save osx-battery

Usage

const osxBattery = require('osx-battery');
 
osxBattery().then(res => {
    console.log(res);
    /*
    { 
        adapterInfo: 0,
        amperage: -1178,
        avgTimeToEmpty: 380,
        avgTimeToFull: 65535,
        batteryInstalled: true,
        batteryInvalidWakeSeconds: 30,
        batterySerialNumber: 'C01447304DPF9CRA8',
        bootPathUpdated: 1431448419,
        cellVoltage: [ 4098, 4105, 4104, 0 ],
        currentCapacity: 7468,
        cycleCount: 39,
        ...
    }
    */
});

Related

License

MIT © Andreas Gillström

Package Sidebar

Install

npm i osx-battery

Weekly Downloads

370

Version

4.0.0

License

MIT

Last publish

Collaborators

  • gillstrom