JSPM

@suryakant/ipcountry

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q21002F
  • License MIT

Get IP address and Country code

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@suryakant/ipcountry) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Get User's IP and Country

    React and React Native get User's IP and Country

    Install

    yarn add @suryakant/ipcountry

    Or

    npm i --save @suryakant/ipcountry

    API Reference

    Methods

      let {ipAddress, countryCode}=await=GetIpCountry()

    The above method will return user's IP address and country code.

    React hook

      let countryCode = useGetCountryCode();

    Hook will return the Country code i.e.: IN, US