lepu-test-platform-web/node_modules/internal-ip
zhangbo db3ebd0df0 把之前百度云的代码移植过来 2024-01-03 15:23:47 +08:00
..
cli.js 把之前百度云的代码移植过来 2024-01-03 15:23:47 +08:00
index.js 把之前百度云的代码移植过来 2024-01-03 15:23:47 +08:00
license 把之前百度云的代码移植过来 2024-01-03 15:23:47 +08:00
package.json 把之前百度云的代码移植过来 2024-01-03 15:23:47 +08:00
readme.md 把之前百度云的代码移植过来 2024-01-03 15:23:47 +08:00

readme.md

internal-ip Build Status

Get your internal IPv4 or IPv6 address

CLI

$ npm install --global internal-ip
$ internal-ip --help

  Usage
    $ internal-ip

  Options
    -4, --ipv4  Return the IPv4 address (default)
    -6, --ipv6  Return the IPv6 address

  Example
    $ internal-ip
    192.168.0.123
    $ internal-ip -6
    fe80::200:f8ff:fe21:67cf

API

$ npm install --save internal-ip
var internalIp = require('internal-ip');

internalIp.v4();
//=> '192.168.0.123'

internalIp.v6();
//=> 'fe80::200:f8ff:fe21:67cf'

See public-ip or ipify to get your external IP address.

License

MIT © Sindre Sorhus