Socket
Book a DemoInstallSign in
Socket

@swingby-protocol/ip-check

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swingby-protocol/ip-check

Small util to check a user's country by IP and whether access to our product should be restricted

latest
Source
npmnpm
Version
2.1.0
Version published
Maintainers
3
Created
Source

Small util to check a user's country by IP and whether access to our product should be restricted.

Getting started

  • Install with yarn add @swingby-protocol/ip-check.
  • Get an API key for ipapi.co. (Optional)
import { getIpInfo, shouldBlockRegion } from '@swingby-protocol/ip-check';

const ipInfo = await getIpInfo({ ip: '…', ipApiKey: '…' });
const yesOrNo = shouldBlockRegion(ipInfo);

Keywords

Crypto

FAQs

Package last updated on 08 Jan 2021

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