New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dyndns/ipify

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dyndns/ipify

[![NPM version][npm-image]][npm-url] [![NPM downloads][downloads-image]][downloads-url]

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-41.67%
Maintainers
1
Weekly downloads
 
Created
Source

@dyndns/ipify

NPM version NPM downloads

This package consumes ipify.org APIs and retrieves the current machines public IP address (both v4 and v6). This can be used in both CLI and library (JS/Typescript in both NodeJS and browser) mode.

Installation

There are three different methods to install and use this package.

# 1) no installation
# npx (or similar package runners)
npx @dyndns/ipify@latest

# 2) install globally (usable in other apps and CLI)
# npm (or similar package runners)
npm i -g @dyndns/ipify@latest

# 3) install as a dependency in your application
# npm (or similar package runners)
npm i @dyndns/ipify@latest

Usage

Library (JS/TS)

If you've followed the library method in the first step, then the package is available as a dependency.

// javascript (CJS)

const ipRetriever = require('@dyndns/ipify');

const retrieveIP = ipRetriever.create();

retrieveIP('v4') // or "v6"
  .then((ipAddress) => console.log(ipAddress))
  .catch(console.error);
// typescript/javascript (module)

import * as ipRetriever from '@dyndns/ipify';

const retrieveIP = ipRetriever.create();

retrieveIP('v4') // or "v6"
  .then((ipAddress) => console.log(ipAddress))
  .catch(console.error);
CLI

If you've followed the CLI installation method in the first step, then the package is available as a command in your OS.

# using npx
npx @dyndns/ipify@latest

# if installed globally
dd-ipify --help


ipify.org command-line interface (CLI)

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]
  --ip       IP address version            [choices: "v4", "v6"] [default: "v4"]

License

GPL-3.0

FAQs

Package last updated on 05 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc