How to use geoip-country - 1 common examples

To help you get started, we’ve selected a few geoip-country examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Flood-UI / flood / server / util / clientResponseUtil.js View on Github external
peers = mapPropsToResponse(torrentPeerPropsMap.props, peersData).map(peer => {
      const geoData = geoip.lookup(peer.address) || {};
      peer.country = geoData.country;

      // Strings to boolean
      peer.isEncrypted = peer.isEncrypted === '1';
      peer.isIncoming = peer.isIncoming === '1';

      return peer;
    });
  }

geoip-country

Quick country lookup from IP address

MaxMind GeoLite2 License
Latest version published 3 days ago

Package Health Score

78 / 100
Full package analysis

Popular geoip-country functions