
Product
Reachability for Ruby Now in Beta
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.
country-code-full-text
Advanced tools
Finds countries by various country codes. Upgraded to find countries even where country name is misspelt.
This module is a clone of country-code-lookup with one main difference; You can misspell country names and still get results.
To achieve this, we use string-similarity to search for the most likely result and return that.
Sometimes country data is fetched from different forms with different spellings. For example, I was writing an app that seeks to map IP Data in Geo Map using chartjs-chart-geo (ChartJs).
The data used to render the world map is fetched from this Countries GeoJSON. Now the trouble is that the GeoJSON contains country names such as "British Virgin Is.". This entry cannot be found unless we use some full text search capabilities to match it to "British Virgin Islands".
Everything else is as in the original country-code-lookup module.
A node.js module to look up countries by various country codes.
Supported codes:
$ npm install country-code-lookup
const lookup = require('country-code-lookup')
// search by FIPS
lookup.byFips('UK')
// search by ISO
lookup.byIso('GB')
lookup.byIso('GBR')
lookup.byIso(826)
// search by internet code
lookup.byInternet('UK')
// search by country name
// NOTE: Full text search only applies for 'byCountry' search
lookup.byCountry('United Kingdom')
// get an array of all countries
lookup.countries
Searching for a country will return either null, or a country object:
{ continent: 'Europe',
region: 'Western Europe',
country: 'United Kingdom',
capital: 'London',
fips: 'UK',
iso2: 'GB',
iso3: 'GBR',
isoNo: '826',
internet: 'UK' }
ISO 2 and 3 digit country codes: https://www.iban.com/country-codes
MIT
FAQs
Finds countries by various country codes. Upgraded to find countries even where country name is misspelt.
We found that country-code-full-text demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.