1.0.0 • Published 11 years ago

battery-path v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
11 years ago

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.