# is-charging

> Find out if a computer is charging

Latest version **2.0.0** (published 2018-05-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-charging
pnpm add is-charging
yarn add is-charging
bun add is-charging
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-05-16 |
| First published | 2016-07-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/is-charging) |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 3 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 76 |
| Author | Andreas Gillström |
| Maintainers | gillstrom |
| Keywords | battery, charge, charging, indication, is, linux, mac, osx, utility, win, windows |

## Links

- npm: https://www.npmjs.com/package/is-charging
- Repository: https://github.com/gillstrom/is-charging
- Homepage: https://github.com/gillstrom/is-charging#readme
- Issues: https://github.com/gillstrom/is-charging/issues
- npm.io page: https://npm.io/package/is-charging

## Dependencies (3)

- [execa](https://npm.io/package/execa.md) ^0.8.0
- [osx-battery](https://npm.io/package/osx-battery.md) ^4.0.0
- [linux-battery](https://npm.io/package/linux-battery.md) ^3.0.1

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2018-05-16
- 1.2.0 — 2017-06-02
- 1.1.0 — 2016-08-25
- 1.0.0 — 2016-07-25

## 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)

---
_Source: https://npm.io/package/is-charging · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
