ipify.js

1.1.6 • Public • Published

ipify.js Build Status

installation command

npm i ipify.js

ipify for browser and server

  • no dependecies
  • lightweight < 350 Bytes (minified + Gzip)
  • No IE support (Promise polyfill required for IE)
  • Node.js requirements (>= 0.12)

Example

 
const { ipv4, ipv6 } = require('ipify.js');
 
const getIP = async () => {
  const ipv4 = await ipv4();
  // 64.233.161.147
  const ipv6 = await ipv6();
  // 2001:0db8:0000:0000:0000:ff00:0042:8329
}
getIP();

/ipify.js/

    Package Sidebar

    Install

    npm i ipify.js

    Weekly Downloads

    16

    Version

    1.1.6

    License

    MIT

    Unpacked Size

    5.01 kB

    Total Files

    8

    Last publish

    Collaborators

    • kokill