# inet

> functions (aton and ntoa) to convert IPv4 string addresses to numeric format and vice versa

Latest version **0.0.3** (published 2013-07-15) · MIT license · 0 weekly downloads

## Install

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

## 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.3 |
| Published | 2013-07-15 |
| First published | 2013-04-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | T. Budiman |
| Maintainers | tbudiman |

## Links

- npm: https://www.npmjs.com/package/inet
- Repository: https://github.com/mywebclass/inet
- Issues: https://github.com/mywebclass/inet/issues
- npm.io page: https://npm.io/package/inet

## Dependencies (1)

- [underscore.string](https://npm.io/package/underscore.string.md) *

## Recent versions

- 0.0.3 (latest) — 2013-07-15
- 0.0.2 — 2013-05-25
- 0.0.1 — 2013-04-20

## README

inet
====

Install with:

```javascript
$ npm install inet
```

Sample usage script:

```javascript
var inet = require("inet");

console.log(inet.aton("125.121.234.1"));
console.log(inet.ntoa(2107846951));
```

API Documentation
-----------------

### aton(str)

Given the dotted-quad representation of an IPv4 network address as a string, returns an integer that represents the numeric value of the address in network byte order (big endian). `aton()` returns `null` if it does not understand its argument. For IP Address of 'a.b.c.d', the numerical representation would be: a * 256^3 + b * 256^2 + c * 256 + d.

### ntoa(int)

Given a numeric IPv4 network address in network byte order, returns the dotted-quad representation of the address as a binary string. ntoa() returns null if it does not understand its argument.

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