Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-charging

gillstrom406MIT2.0.0TypeScript support: definitely-typed

Find out if a computer is charging

battery, charge, charging, indication, is, linux, mac, osx, utility, win, windows

readme

is-charging

Find out if a computer is charging

Install

$ npm install is-charging

Usage

const isCharging = require('is-charging');

isCharging().then(result => {
    console.log(result);
    //=> true
});

API

isCharging()

Returns a promise that resolves in to a Boolean.

License

MIT © Andreas Strandman