react-select-country-list
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -20,11 +20,11 @@ 'use strict' | ||
CountryList.prototype.getvalue = function getvalue (label) { | ||
CountryList.prototype.getvalue = function getValue (label) { | ||
return labelMap[label.toLowerCase()] | ||
} | ||
CountryList.prototype.getlabel = function getlabel (value) { | ||
CountryList.prototype.getlabel = function getLabel (value) { | ||
return valueMap[value.toLowerCase()] | ||
} | ||
CountryList.prototype.getlabels = function getlabels () { | ||
CountryList.prototype.getlabels = function getLabels () { | ||
return data.map(function (country) { | ||
@@ -35,3 +35,3 @@ return country.label | ||
CountryList.prototype.getvalues = function getvalues () { | ||
CountryList.prototype.getvalues = function getValues () { | ||
return data.map(function (country) { | ||
@@ -42,7 +42,7 @@ return country.value | ||
CountryList.prototype.getvalueList = function () { | ||
CountryList.prototype.getValueList = function () { | ||
return valueMap | ||
} | ||
CountryList.prototype.getlabelList = function () { | ||
CountryList.prototype.getLabelList = function () { | ||
return labelMap | ||
@@ -49,0 +49,0 @@ } |
{ | ||
"name": "react-select-country-list", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Maps ISO 3166-1-alpha-2 codes to English country names and match react-select options props", | ||
@@ -21,3 +21,3 @@ "main": "country-list.js", | ||
"type": "git", | ||
"url": "git+https://github.com/Chun-Lin/country-list.git" | ||
"url": "git+https://github.com/Chun-Lin/react-select-country-list.git" | ||
}, | ||
@@ -31,5 +31,5 @@ "keywords": [ | ||
"license": "MIT", | ||
"homepage": "https://github.com/Chun-Lin/country-list", | ||
"homepage": "https://github.com/Chun-Lin/react-select-country-list", | ||
"bugs": { | ||
"url": "https://github.com/Chun-Lin/country-list/issues" | ||
"url": "https://github.com/Chun-Lin/react-select-country-list/issues" | ||
}, | ||
@@ -36,0 +36,0 @@ "directories": { |
@@ -14,4 +14,4 @@ # country-list | ||
console.log(countries.getName('IS')); // Iceland | ||
console.log(countries.getCode('Iceland')); // IS | ||
console.log(countries.getValue('IS')); // Iceland | ||
console.log(countries.getLabel('Iceland')); // IS | ||
``` | ||
@@ -28,3 +28,3 @@ | ||
### getName(code) | ||
### getValue(code) | ||
@@ -35,3 +35,3 @@ Expects a two-digit country code. | ||
### getCode(name) | ||
### getLabel(name) | ||
@@ -42,15 +42,15 @@ Expects the English country name. | ||
### getNames() | ||
### getValues() | ||
Returns an array of all country names. | ||
### getCodes() | ||
### getLabels() | ||
Returns an array of all country codes. | ||
### getNameList() | ||
### getValueList() | ||
Returns a key-value object of all countries using the name as key. | ||
### getCodeList() | ||
### getLabelList() | ||
@@ -63,6 +63,9 @@ Returns a key-value object of all countries using the code as key. | ||
### Use with | ||
## Install | ||
``` cli | ||
npm install country-list | ||
npm install react-select-country-list | ||
``` | ||
@@ -69,0 +72,0 @@ |
Sorry, the diff of this file is not supported yet
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
18120
71