1.0.0 • Published 11 years ago
battery-path v1.0.0
battery-path
Get the path to a battery. Probably only works on Linux.
Really simple module created to reduce code duplication across my battery modules. Changes to this module will seamlessly propagate to other modules that deal with batteries.
Example
var batteryPath = require('battery-path');
batteryPath('BAT0');
// => '/sys/class/power_supply/BAT0'
Installation
$ npm install battery-path
API
var batteryPath = require('battery-path');
batteryPath(battery)
Returns the String path to battery
.
1.0.0
11 years ago