https://github.com/gillstrom/is-charging
Find out if a computer is charging
https://github.com/gillstrom/is-charging
charging cli javascript node
Last synced: about 1 year ago
JSON representation
Find out if a computer is charging
- Host: GitHub
- URL: https://github.com/gillstrom/is-charging
- Owner: gillstrom
- License: mit
- Created: 2016-07-25T21:28:10.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-05-16T06:29:33.000Z (about 8 years ago)
- Last Synced: 2025-04-14T01:54:11.017Z (about 1 year ago)
- Topics: charging, cli, javascript, node
- Language: JavaScript
- Size: 6.84 KB
- Stars: 75
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# is-charging
> Find out if a computer is charging
## Install
```
$ npm install is-charging
```
## Usage
```js
const isCharging = require('is-charging');
isCharging().then(result => {
console.log(result);
//=> true
});
```
## API
### isCharging()
Returns a promise that resolves in to a `Boolean`.
## Related
* [is-charging-cli](https://github.com/gillstrom/is-charging-cli) - CLI for this module
* [battery-level](https://github.com/gillstrom/battery-level) - Get current battery level
* [browser-battery](https://github.com/gillstrom/browser-battery) - Get and watch battery information in a browser
## License
MIT © [Andreas Strandman](https://github.com/gillstrom)