New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ip2location-nodejs

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip2location-nodejs - npm Package Compare versions

Comparing version 9.4.0 to 9.4.1

2

package.json
{
"name": "ip2location-nodejs",
"version": "9.4.0",
"version": "9.4.1",
"description": "IP2Location geolocation component",

@@ -5,0 +5,0 @@ "keywords": [

@@ -201,1 +201,47 @@ [![npm](https://img.shields.io/npm/v/ip2location-nodejs.svg)](http://npm.im/ip2location-nodejs)

```
## COUNTRY CLASS
## Methods
Below are the methods supported in this module.
|Method Name|Description|
|---|---|
|getCountryInfo(countryCode)|Returns the country information.|
## Usage
```javascript
const {Country} = require("ip2location-nodejs");
let country = new Country("./IP2LOCATION-COUNTRY-INFORMATION-BASIC.CSV");
country.getCountryInfo("US").then(country_info => {
console.log(country_info);
});
country.getCountryInfo("").then(country_info => {
console.log(country_info);
});
```
## REGION CLASS
## Methods
Below are the methods supported in this module.
|Method Name|Description|
|---|---|
|getRegionCode(countryCode, regionName)|Returns the region code for the supplied country code and region name.|
## Usage
```javascript
const {Region} = require("ip2location-nodejs");
let region = new Region("./IP2LOCATION-ISO3166-2.CSV");
region.getRegionCode("US", "California").then(region_code => {
console.log(region_code);
});
```

@@ -8,3 +8,3 @@ var net = require("net");

// For BIN queries
const VERSION = "9.4.0";
const VERSION = "9.4.1";
const MAX_INDEX = 65536;

@@ -11,0 +11,0 @@ const COUNTRY_POSITION = [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc