cloud-regions-country-flags
Advanced tools
Comparing version 0.0.3 to 0.0.4
11
index.js
@@ -7,3 +7,3 @@ exports.getInfo = function (region, provider) { | ||
if (!provider) { | ||
if (provider === 'AWS') { | ||
// AWS | ||
@@ -161,3 +161,3 @@ switch (region) { | ||
} | ||
} else { | ||
} else if (provider === 'GCP') { | ||
// GCP | ||
@@ -705,2 +705,9 @@ switch (region) { | ||
} | ||
} else { | ||
switch (region) { | ||
default: | ||
obj.location = 'Unknown provider'; | ||
obj.flag = 'โ ๏ธ'; | ||
break; | ||
} | ||
} | ||
@@ -707,0 +714,0 @@ |
{ | ||
"name": "cloud-regions-country-flags", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A library to convert cloud provider regions to country flag emojis", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -16,20 +16,18 @@ # cloud-regions-country-flags | ||
// Defaults to Amazon Web Services (ASWS) | ||
getInfo('eu-north-1'); | ||
getInfo('eu-north-1', 'AWS'); | ||
// => { location: 'Europe (Stockholm)', flag: '๐ธ๐ช' } | ||
``` | ||
## Options | ||
getInfo('us-west2-a', 'GCP'); | ||
Pass in Cloud Provider. Currently only accepts 'AWS' or 'GCP' | ||
```javascript | ||
import { getInfo } from 'cloud-regions-country-flags'; | ||
// Set Cloud Provider to Google Cloud Platofmr (GCP) | ||
getInfo('us-west2-a', 'GCP'); | ||
// => { location: 'Los Angeles, California, North Americ', flag: '๐บ๐ธ' } | ||
``` | ||
## Parameters | ||
| Name | Type | Required | Description | | ||
| -------- | ----------------- | -------- | ---------------------- | | ||
| region | string | true | name of cloud region | | ||
| provider | string AWS or GCP | true | name of cloud provider | | ||
## Help | ||
@@ -36,0 +34,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
20750
575
0
36