1.0.2 • Published 3 months ago

qiao-ip v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

qiao-ip

npm version npm downloads

Get public network ip under browser and node.js

install

npm i qiao-ip

usage

// commonjs
const { getIP } = require('qiao-ip');

// es6
import { getIP } from 'qiao-ip';

api

getIP

get public network ip

  • timeout
    • type: number
    • desc: timeout, ms, default: 300ms
  • debug
    • type: boolean
    • desc: whether to display debug logs, default: false
  • return
    • type: string
    • desc: ip
// ip
const ip = await getIP(timeout);

// ip debug
const ip = await getIP(timeout, true);

fast

Request the following websites and return the fastest response. The default timeout is 300ms

1.0.2

3 months ago

1.0.1

3 months ago

1.0.0

3 months ago