Installations
npm install hof-util-countries
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
6.9.4
NPM Version
4.5.0
Score
65.9
Supply Chain
72.2
Quality
82.4
Maintenance
100
Vulnerability
99.3
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
UKHomeOfficeForms
Download Statistics
Total Downloads
14,183
Last Day
1
Last Week
4
Last Month
8
Last Year
154
GitHub Statistics
3 Commits
1 Forks
5 Watching
2 Branches
1 Contributors
Bundle Size
4.15 kB
Minified
2.02 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.0.0
Package Id
hof-util-countries@1.0.0
Size
2.92 kB
NPM Version
4.5.0
Node Version
6.9.4
Total Downloads
Cumulative downloads
Total Downloads
14,183
Last day
0%
1
Compared to previous day
Last week
300%
4
Compared to previous week
Last month
0%
8
Compared to previous month
Last year
24.2%
154
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
4
hof-util-countries
A utility to parse homeoffice-countries
into a usable format for hof select elements
By default hof select elements expect a list of options as an objet with value
and label
properties. If passed an array of strings as options it will attempt to translate the strings with some field-specific keys attached.
Usage
In field configuration:
1{ 2 country: { 3 mixin: 'select', 4 validate: 'required', 5 options: require('hof-util-countries')() 6 } 7}
Options
If needed, the following options can be passed into the countries function:
filter
-Function
- applies a filter to the list of country names before mapping themparse
-Function
- applies a transform to the country name before setting the label
i18n
If you wish to translate the countries into outher languages, you may want the labels to be in the form of translation keys. In this case you can use a parse
option to convert the country names into a translation key:
1const countries = require('hof-util-countries'); 2const options = countries({ 3 parse: country => `countries.${country.toLowerCase().split(' ').join('-')}` 4});
You can then define a single translation for country names to be used for all country list instances.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 1/3 approved changesets -- score normalized to 3
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
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 1 are checked with a SAST tool
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3.4
/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