# is-local-ip

> Check that a given ip address is private.

Latest version **1.1.0** (published 2017-09-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-local-ip
pnpm add is-local-ip
yarn add is-local-ip
bun add is-local-ip
```

Provides the command `is-local-ip`.

## 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.1.0 |
| Published | 2017-09-27 |
| First published | 2016-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Dylan Piercey |
| Maintainers | dylanpiercey |
| Keywords | ip, is-local-ip, local, private, test |

## Links

- npm: https://www.npmjs.com/package/is-local-ip
- Repository: https://github.com/DylanPiercey/is-local-ip
- Issues: https://github.com/DylanPiercey/is-local-ip/issues
- npm.io page: https://npm.io/package/is-local-ip

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2017-09-27
- 1.0.1 — 2016-04-02
- 1.0.0 — 2016-04-01

## README

# is-local-ip
Check that a given IP Address is private.


# Installation

#### Npm
```console
npm install is-local-ip
```

# Example

```javascript
var isLocal = require('is-local-ip');

isLocal("127.0.0.1"); // true
isLocal("::ffff:127.0.0.1"); // true
isLocal("192.168.0.12"); // true
isLocal("184.55.123.2"); // false
```

# Valid Private IP'S
* `::`
* `::1`
* `fc00::/7`
* `fe80::/10`
* `10.0.0.0` - `10.255.255.255`
* `127.0.0.0` - `127.255.255.255`
* `169.254.1.0` - `169.254.254.255`
* `172.16.0.0` - `172.31.255.255`
* `192.168.0.0` - `192.168.255.255`

### Contributions

* Use `npm test` to run tests.

Please feel free to create a PR!

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