# isipaddress

> Pure Javascript implementation for truly checking if the provided input is an IP address. Based on RFC 791 (IPv4), RFC 4291 (IPv6), and RFC 4632 (CIDR).

Latest version **0.0.2** (published 2014-10-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install isipaddress
pnpm add isipaddress
yarn add isipaddress
bun add isipaddress
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2014-10-18 |
| First published | 2014-10-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | David Pate |
| Maintainers | davidtpate |
| Keywords | ip, ipv4, ipv6, ipvfuture, ipaddress, internet protocol, type, checker, validator, validate |

## Links

- npm: https://www.npmjs.com/package/isipaddress
- Repository: https://github.com/DavidTPate/isip
- Issues: https://github.com/DavidTPate/isip/issues
- npm.io page: https://npm.io/package/isipaddress

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 0.0.2 (latest) — 2014-10-18
- 0.0.1 — 2014-10-18

## README

isIP
=====
[![NPM version](https://badge.fury.io/js/isip.svg)](http://badge.fury.io/js/isipaddress)
[![Build Status](https://travis-ci.org/DavidTPate/isip.svg?branch=master)](https://travis-ci.org/DavidTPate/isip)
[![Coverage Status](https://img.shields.io/coveralls/DavidTPate/isip.svg?branch=master)](https://coveralls.io/r/DavidTPate/isip)

Pure Javascript implementation for truly checking if the provided input is an IP address. Based on [RFC 791 (IPv4)](http://tools.ietf.org/html/rfc791), [RFC 4291 (IPv6)](http://tools.ietf.org/html/rfc4291), and [RFC 4632 (CIDR)](http://tools.ietf.org/html/rfc4632).

## Install

#### NPM
```bash
$ npm install isipaddress
```

## Node.js
```js
var isIP = require('isipaddress');

isIP.test('127.0.0.1'); // returns true
isIP.test('FEDC:BA98:7654:3210:FEDC:BA98:7654:3210/16'); // returns true
isIP.test('Bananas in pajamas are coming down the stairs'); // returns false

isIP.v4('127.0.0.1'); // returns true
isIP.v4('127.0.0.1/18'); // returns true
isIP.v4('FEDC:BA98:7654:3210:FEDC:BA98:7654:3210'); // returns false

isIP.v6('127.0.0.1'); // returns false
isIP.v6('FEDC:BA98:7654:3210:FEDC:BA98:7654:3210'); // returns true
isIP.v6('FEDC:BA98:7654:3210:FEDC:BA98:7654:3210/32'); // returns true
```

## License

  [MIT](LICENSE)

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