# whichip

> discover (IoT) device's IP in local network

Latest version **0.1.0** (published 2021-12-07) · ISC license · 0 weekly downloads

## Install

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

Provides the command `whichip`.

## 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.1.0 |
| Published | 2021-12-07 |
| First published | 2021-12-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=16.0.0 |
| Dependencies | 2 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | observerss |

## Links

- npm: https://www.npmjs.com/package/whichip
- npm.io page: https://npm.io/package/whichip

## Dependencies (2)

- [pino](https://npm.io/package/pino.md) ^7.5.1
- [commander](https://npm.io/package/commander.md) ^8.3.0

## Recent versions

- 0.1.0 (latest) — 2021-12-07

## README

# NodeJS Client

## Install

```bash
npm install -g whichip
```

## Usage

### In Terminal

```bash
$ whichip discover --timeout 0.2 --all --debug
#10.86.8.222
# or
#not found
```

### In Code


```bash
npm install whichip
```

Then,

```javascript
const { discover } = require('whichip')

opts = {
  debug: false,  // print debug message
  port: 53535,   // remote server port
  all: true,    // true => wait until timeout; false => return on first ip
  timeout: 0.2,  // discover timeout, seconds
}
discover(opts)
  .then((ips) => {console.log(ips)})
  .catch(console.error)
// [ '10.86.8.222' ]
// -- or --
// not found
```

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