Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

moira

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moira

Most Outstanding IP Reporting Assistant

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

MOIRA

Most Outstanding IP Reporting Assistant

Description

MOIRA is a Node module that retrieves your external IP address asynchronously. It works by requesting your IP from several different IP-fetching services simultaneously and reports the quickest result after verifying that it is a valid IP address. Similar modules that rely on only a single IP-reporting service can introduce issues in the event that the service is offline; I needed something with a bit more redundancy and reliability.

Installation

You may install MOIRA via Node Package Manager as follows:

npm install moira

The source code is available on GitHub.

Usage

Example (see test/test.js)

var moira = require('../lib/moira');

moira.getIP(function(err, IP, service) {
    if(err) {
        console.log("All attempts to retrieve your IP address were exhausted. Is there a problem with your connection?");
    } else {
        console.log("Your external IP address is " + IP);
        console.log("The fastest service to return your IP address was " + service);
    }
});

Callback Arguments

"err" - Null if an IP address was found
"IP" - String - Validated IPv4 address (e.g. 74.125.239.128)
"service" - String - The URL of the IP reporting service that returned the IP address (e.g. http://whatismyip.akamai.com/)

Improving MOIRA

If you would like to contribute code or simply add an IP reporting service, feel free to submit a pull request. Please report issues here.

Keywords

FAQs

Package last updated on 25 Mar 2014

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