# internet-available

> A module to verify if there's an active internet connection with Node.js

Latest version **1.0.0** (published 2017-05-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install internet-available
pnpm add internet-available
yarn add internet-available
bun add internet-available
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-05-23 |
| First published | 2017-05-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | Our Code World |
| Maintainers | sdkcarlos |
| Keywords | internet, online, offline, is-online, network, connected, connectivity, internet, is, has, detect, hostname, hostnames, dns, socket, reachable, reachability, accessible |

## Links

- npm: https://www.npmjs.com/package/internet-available
- Repository: https://github.com/ourcodeworld/internet-available
- Homepage: https://github.com/ourcodeworld/internet-available#readme
- Issues: https://github.com/ourcodeworld/internet-available/issues
- npm.io page: https://npm.io/package/internet-available

## Dependencies (1)

- [dns-socket](https://npm.io/package/dns-socket.md) ^1.6.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

- 1.0.0 (latest) — 2017-05-23

## README

# internet-available

A module to verify if there's an active internet connection with Node.js

# Installation

You can install this module through NPM using the following command in your terminal:

```bash
$ npm install internet-available --save
```

# Example

internet-available requires Promises to work correctly. It's easy to use:

```javascript
var internetAvailable = require("internet-available");

// Most easy way
internetAvailable({
    // Provide maximum execution time for the verification
    timeout: 5000,
    // If it tries 5 times and it fails, then it will throw no internet
    retries: 5
}).then(() => {
    console.log("Internet available");
}).catch(() => {
    console.log("No internet");
});
```

But configurable too (check the docs).

# Documentation

[The official documentation of the project can be found in Our Code World here](http://docs.ourcodeworld.com/projects/internet-available).

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