Naughty Platypus Memorabilia

    self-ip

    0.3.7 • Public • Published

    self-ip

    NPM

    npm Build Status dependencies Status devDependencies Status Greenkeeper badge

    Get self IP addresses

    Getting Started

    $ yarn add self-ip
    

    or

    $ npm install --save self-ip
    

    Usage

    const ip = require('self-ip')
     
    ip() // { v4: ['192.0.0.2'], v6: ['ffff::abcd:1234:1234:5678'] }
    ip.v4() // ['192.0.0.2']
    ip.v6() // ['ffff::abcd:1234:1234:5678']

    Reference

    ip([ isLo = require('is-lo') ])

    • isLo(addrs, name) (function): check if it is a loopback network interface or not
    • Result (Object): { v4: ['v4addr'], v6: ['v6addr'] }

    ip.v4([ isLo = require('is-lo') ])

    • isLo(addrs, name) (function): check if it is a loopback network interface or not
    • Result (Array): ['v4addr']

    ip.v6([ isLo = require('is-lo') ])

    • isLo(addrs, name) (function): check if it is a loopback network interface or not
    • Result (Array): ['v6addr']

    License

    MIT © Pine Mizune

    Keywords

    none

    Install

    npm i self-ip

    DownloadsWeekly Downloads

    127

    Version

    0.3.7

    License

    MIT

    Unpacked Size

    4.58 kB

    Total Files

    5

    Last publish

    Collaborators

    • mizuki_r
    • pine613