countries-and-timezones
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "countries-and-timezones", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Minimalistic library to work with countries and timezones data.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
# countries-and-timezones | ||
![](https://img.shields.io/wercker/ci/wercker/docs.svg?style=flat) | ||
![](https://img.shields.io/dub/l/vibe-d.svg?style=flat) | ||
@@ -17,8 +19,9 @@ This is a minimalistic library to work with countries and timezones data. | ||
* *id:* The country [ISO code](https://es.wikipedia.org/wiki/ISO_3166-1). | ||
* *name:* Name in english. | ||
* *timezones:* An array of ids of the timezones available in the country. | ||
* **id:** The country [ISO code](https://es.wikipedia.org/wiki/ISO_3166-1). | ||
* **name:** Name in english. | ||
* **timezones:** An array of ids of the timezones available in the country. | ||
``` | ||
{ id: 'MX', | ||
```javascript | ||
{ | ||
id: 'MX', | ||
name: 'Mexico', | ||
@@ -52,8 +55,9 @@ timezones: [ | ||
``` | ||
{ name: 'Asia/Dubai', | ||
```javascript | ||
{ | ||
name: 'Asia/Dubai', | ||
utcOffset: 240, | ||
offsetStr: '+04:00', | ||
countries: [ 'AE', 'OM' ] | ||
} | ||
} | ||
``` | ||
@@ -63,3 +67,3 @@ | ||
### raw | ||
### .raw | ||
@@ -70,4 +74,6 @@ Contains and object with the raw data used in this library. | ||
``` | ||
var rawData = countriesAndTimezones.raw; | ||
```javascript | ||
const ct = require('countries-and-timezones'); | ||
const rawData = ct.raw; | ||
console.log(rawData); | ||
@@ -87,3 +93,3 @@ | ||
### getAllCountries | ||
### .getAllCountries() | ||
@@ -94,4 +100,6 @@ Returns an object with the data of all countries. | ||
``` | ||
var countries = countriesAndTimezones.getAllCountries(); | ||
```javascript | ||
const ct = require('countries-and-timezones'); | ||
const countries = ct.getAllCountries(); | ||
console.log(countries); | ||
@@ -122,3 +130,3 @@ | ||
### getAllTimezones | ||
### .getAllTimezones() | ||
@@ -129,4 +137,6 @@ Returns an object with the data of all timezones. | ||
``` | ||
var timezones = countriesAndTimezones.getAllTimezones(); | ||
```javascript | ||
const ct = require('countries-and-timezones'); | ||
const timezones = ct.getAllTimezones(); | ||
console.log(timezones); | ||
@@ -159,3 +169,3 @@ | ||
### getTimezonesForCountry | ||
### .getTimezonesForCountry() | ||
@@ -166,4 +176,6 @@ Returns an array with the timezones of a country given its id. | ||
``` | ||
var mxTimezones = countriesAndTimezones.getTimezonesForCountry('MX'); | ||
```javascript | ||
const ct = require('countries-and-timezones'); | ||
const mxTimezones = ct.getTimezonesForCountry('MX'); | ||
console.log(mxTimezones); | ||
@@ -194,3 +206,3 @@ | ||
### getCountriesForTimezone | ||
### .getCountriesForTimezone() | ||
@@ -201,4 +213,6 @@ Returns an array with the country that use a timezone given its id. | ||
``` | ||
var nyTimezone = countriesAndTimezones.getCountriesForTimezone('America/New_York'); | ||
```javascript | ||
const ct = require('countries-and-timezones'); | ||
const nyTimezone = ct.getCountriesForTimezone('America/New_York'); | ||
console.log(nyTimezone); | ||
@@ -227,1 +241,5 @@ | ||
``` | ||
## License | ||
MIT |
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
97529
233