ioreg
v0.0.1
Published
Query I/O Kit registry
Downloads
9
Readme
ioreg
npm install --save ioreg
Usage
const ioreg = require('ioreg')
ioreg('AppleSmartBattery')
.then(result => console.log(result))
.catch(err => console.error(err))
// [
// {
// AdapterInfo: 0,
// Amperage: 4683,
// AvgTimeToEmpty: 65535,
// AvgTimeToFull: 130,
// BatteryInstalled: true,
// BatteryInvalidWakeSeconds: 30,
// ...
// }
// ]
Options
Options can be passed to ioreg
, e.g.
ioreg('gpu-sensor', ['-i'])