1.2.8 • Published 2 years ago

gre-geoip v1.2.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

npm version    GitHub code size in bytes    License: MIT    API Status

Requirements

No requirements for using this package.

Installation

For Node.js, React.js & React Native:

npm i gre-geoip --save

or

yarn add gre-geoip

For Browser:

<script src="https://cdn.jsdelivr.net/gh/gre-dev/GeoIP-JS@latest/gre-geoip.min.js"></script>

Usage

Let's say that we want to get the visitor IP Address. So we do the following:

For Node.js, React.js & React Native:

const GREGeoIP = require('gre-geoip');
const GeoIP = new GREGeoIP('<API-Key>');

GeoIP.geoip({}).then(res => {
    console.log(res?.data?.ip);
});

For Browser:

<script>
    const GeoIP = new GREGeoIP('<API-Key>');

    GeoIP.geoip({}).then(res => {
        console.log(res?.data?.ip);
    });
</script>

Options, Methods and More

You can find the full guide of this package by visiting our Documentation Page.

Credits

License

The MIT License (MIT). Please see License File for more information.

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago