Installations
npm install @koterion/country_list
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
12.9.1
NPM Version
6.10.2
Score
46.9
Supply Chain
86.1
Quality
75.7
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (87.9%)
CSS (10.75%)
HTML (1.35%)
Developer
Download Statistics
Total Downloads
4,653
Last Day
2
Last Week
3
Last Month
52
Last Year
550
GitHub Statistics
2 Stars
88 Commits
1 Forks
2 Watching
3 Branches
1 Contributors
Bundle Size
18.21 kB
Minified
5.79 kB
Minified + Gzipped
Package Meta Information
Latest Version
3.0.0
Package Id
@koterion/country_list@3.0.0
Unpacked Size
89.95 kB
Size
43.63 kB
File Count
6
NPM Version
6.10.2
Node Version
12.9.1
Total Downloads
Cumulative downloads
Total Downloads
4,653
Last day
0%
2
Compared to previous day
Last week
-83.3%
3
Compared to previous week
Last month
940%
52
Compared to previous month
Last year
-17.7%
550
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
24
React Country List
country_list
is a React Component for entering mobile numbers with code of choosing country.
Live demo
All examples on the demo page
Installing
1npm install --save @koterion/country_list
Examples
Flags image
1.cntr-flag { 2 background-image: url('@koterion/country_list/dist/img/flags.png') 3}
Basic usage
1import CountryList from '@koterion/country_list'; 2import '@koterion/country_list/dist/styles.css'; 3 4const phone = (<CountryList />);
options
option | type | default | desc |
---|---|---|---|
countryAll | array | [] | Array of countries iso |
remove | boolean | false | If true remove countries using countryAll |
list | boolean | false | If true create list of country using countryAll |
flagInInput | boolean | false | If true add flags to current selector |
flagInSelect | boolean | false | If true add flags to dropdown |
geo | object | Use for checked country by ip | |
closestForm | string | form | Closest form or selector |
hasPhone | boolean | false | Using your custom phone input from inputPhoneName |
inputCountryName | string | country | Name for input with country name (auto create type=hidden ) |
inputPhoneName | string | phone | Name for input with phone number |
search | boolean | false | If true create input with name from inputCountryName , live search in country list |
select | boolean | false | If true create list like select |
required | boolean | false | If true add required for input |
countries | json | Countries in json format |
countryAll
Use with delete
or list
Example:
1<CountryList delete countryAll={['ua', 'us']} /> 2<CountryList list countryAll={['ua', 'us']} />
geo
For define country by ip we use service Sypexgeo
You can rewrite method, it option geo
by default it's object with this parameters:
1{ 2 url: 'https://api.sypexgeo.net/', 3 getIso: response => response.country.iso 4}
url
- api for service, getIso
- return country iso
Also you can use current
with current country in ISO format. Example:
1<CountryList current='ua' />
countries
Format for custom countries
1{ 2 "name": "Afghanistan", 3 "iso": "af", 4 "code": "93" 5}, 6{ 7 "name": "Albania", 8 "iso": "al", 9 "code": "355" 10},
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/8 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 30 are checked with a SAST tool
Score
2.6
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More