# ip-in

> IP address and User Country information data get utilities for javaScript .

Latest version **1.2.5** (published 2022-05-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install ip-in
pnpm add ip-in
yarn add ip-in
bun add ip-in
```

## 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.2.5 |
| Published | 2022-05-23 |
| First published | 2022-05-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | LM |
| Maintainers | lmhasib |
| Keywords | ip-in, public-ip, ip, ipv4, ipv6, Location, geoLocation, geo |

## Links

- npm: https://www.npmjs.com/package/ip-in
- Repository: https://github.com/dEvFiRm-Ltd/ip-in
- Homepage: https://github.com/dEvFiRm-Ltd/ip-in#readme
- Issues: https://github.com/dEvFiRm-Ltd/ip-in/issues
- npm.io page: https://npm.io/package/ip-in

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.27.2

## 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

- 1.2.5 (latest) — 2022-05-23
- 1.0.5 — 2022-05-22
- 1.0.4 — 2022-05-22
- 1.0.2 — 2022-05-22
- 1.0.1 — 2022-05-22
- 1.0.0 — 2022-05-22

## README

# ip-in
IP address and  User Country information data get  utilities for javaScript . 





## Installation

Install my-project with npm

```bash
  npm i ip-in
```




## Usage/Examples for node 

### IP Address:
```js
const ip = require('ip-in')

ip.getIpAddress()
.then(data => {
    console.log('ipAddress :',data)
})
```
Result:

```js
ipAddress : 163.172.90.118
```

### user location details

```js
ip.getCountryDetails()
.then(data => {
  console.log('countryDetails:',data)
})
```
Result:
```js
countryDetails : {
  status: 'success',
  ip: '163.172.90.118',
  country: 'France',
  countryCode: 'FR',
  region: 'IDF',
  regionName: 'Île-de-France',
  city: 'Paris',
  zip: '75001',
  lat: 48.8534,
  lon: 2.3488,
  timezone: 'Europe/Paris',
  isp: 'Online S.A.S.',
  org: 'ONLINE',
  as: 'AS12876 ONLINE S.A.S.',
  mobile: false,
  proxy: true
}

```

Or using ES modules and async/await:

```js
import ip from 'ip-in';

(async () => {
   let ipAddress = await ip.getIpAddress()
  console.log('ipAddress',ipAddress)

  let countryDetails = await ip.getCountryDetails()
  console.log('countryDetails',countryDetails)
})();
```

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