iplocation
Version:
Get ip location information.
37 lines (22 loc) • 789 B
Markdown
# iplocation [](https://travis-ci.com/Richienb/iplocation)
Get ip location information.
[](https://npmjs.com/package/iplocation)
## Install
```sh
npm install iplocation
```
## Usage
```js
const ipLocation = require("ip-location");
(async () => {
await ipLocation("172.217.167.78");
//=> { latitude: -33.8591, longitude: 151.2002, region: { name: "New South Wales" ... } ... }
})();
```
## API
### ipLocation(ip)
#### ip
Type: `string`
The ipv4 address to get the information for.
## Related
- [iplocation-cli](https://github.com/Richienb/iplocation-cli) - CLI for this module.