Socket
Socket
Sign inDemoInstall

@e9x/ipi

Package Overview
Dependencies
42
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 2.1.0

4

index.d.ts

@@ -1,6 +0,6 @@

import ipInfo from "./dist/api";
import ipi from "./dist/index";
import type { IPInfo } from "./dist/api";
export default ipi;
// export types
export { ipInfo };
export type { IPInfo };
{
"name": "@e9x/ipi",
"version": "2.0.1",
"version": "2.1.0",
"description": "A free library/cli tool to get IP information.",

@@ -35,19 +35,16 @@ "author": "e9x",

"build": "tsc",
"build:watch": "tsc --watch"
"watch": "tsc --watch"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^3.7.2",
"@types/better-sqlite3": "^7.6.4",
"@types/node": "^20.2.3",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"eslint": "^8.41.0",
"prettier": "^2.8.8",
"typescript": "^5.0.4"
"@types/node": "^18.17.14",
"prettier": "^3.0.3",
"typescript": "^5.2.2"
},
"dependencies": {
"@e9x/ipi-databases": "^1.0.0-monthly.2023.5",
"better-sqlite3": "^8.4.0",
"ip2location-nodejs": "^9.5.0",
"ipaddr.js": "^2.0.1"
"better-sqlite3": "^8.6.0",
"ip2location-nodejs": "^9.6.0",
"ipaddr.js": "^2.1.0"
}
}

@@ -22,2 +22,47 @@ # IPI (IP-Info)

## Maintenance
You might want to update the databases library from time to time. Databases will be updated usually every month (No guarantees 😅️)
```
npm i @e9x/ipi-databases@latest
```
## API
Example:
```js
import ipi from "@e9x/ipi";
const ipInfo = ipi("69.42.0.123");
console.log(ipInfo);
```
```js
{
success: true,
asn: 11404,
asd: 'AS-WAVE-1',
city: 'San Francisco',
region: 'California',
zipCode: '94102',
timezone: '-08:00',
latitude: 37.774929,
longitude: -122.419418,
countryLong: 'United States of America',
countryShort: 'US'
}
```
If you need to access the IPInfo type (TypeScript):
```ts
import ipi, { IPInfo } from "@e9x/ipi";
const whatever: IPInfo = ipi("69.42.0.123");
console.log(whatever);
```
## CLI

@@ -24,0 +69,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc