battery
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

battery Travis CI Build Status

Get battery level and charging status.

NPM Badge

Install

npm install battery

Usage

const battery = require("battery");
 
(async () => {
    const { level, charging } = await battery();
 
    console.log(level);
    //=> 0.8
 
    console.log(charging);
    //=> true
})();

API

battery()

Related

/battery/

    Package Sidebar

    Install

    npm i battery

    Weekly Downloads

    85

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.63 kB

    Total Files

    6

    Last publish

    Collaborators

    • richienb