Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
world-countries-capitals
Advanced tools
A simple NPM package to get capitals, currency, native language etc. of all the countries in the world
This is a Node.js module available through the npm registry.
Before using, download and install Node.js.
Installation is done using the
npm install
command:
$ npm i world-countries-capitals --save
const wcc = require('world-countries-capitals');
[
{
"country": "Afghanistan",
"capital": "Kabul",
"currency": "Afghani",
"native_language": "Dari Persian, Pashto"
},
{
"country": "Albania",
"capital": "Tirane",
"currency": "Lek",
"native_language": "Albanian"
},
...
]
[
'Afghanistan',
'Albania',
'Algeria',
'Andorra',
'Angola',
'Antigua & Barbuda',
'Argentina',
'Armenia',
'Australia',
'Austria',
'Azerbaijan',
...
]
Response for languageSpoken = 'Hindi'
[
{
country: 'Fiji',
capital: 'Suva',
currency: 'Fijian Dollar',
native_language: 'english, bau fijian, hindi',
},
{
country: 'India',
capital: 'New Delhi',
currency: 'Indian Rupee',
native_language: 'hindi, english',
},
];
Response for countryName = 'india'
[
{
country: 'india',
capital: 'New Delhi',
currency: 'Indian Rupee',
native_language: 'Hindi, English',
},
];
Response for capital = 'delhi'
[
{
country: 'India',
capital: 'new delhi',
currency: 'Indian Rupee',
native_language: 'Hindi, English',
},
];
» node app.js
Tuvalu
» node app.js
Bhutan
» node app.js
Saudi Arabia
Response for n = 3
[
{
country: 'Burundi',
capital: 'Bujumbura',
currency: 'Burundi Franc',
native_language: 'Kirundi, French',
},
{
country: 'Palau',
capital: 'Melekeok',
currency: 'United States Dollar',
native_language: 'English, Palauan',
},
{
country: 'Dominican Republic',
capital: 'Santo Domingo',
currency: 'Dominican Peso',
native_language: 'Spanish',
},
];
const wcc = require('world-countries-capitals');
console.log(wcc.getRandomCountry());
const wcc = require('world-countries-capitals');
console.log(wcc.getNRandomCountriesData(3));
const wcc = require('world-countries-capitals');
console.log(wcc.getCountryDetailsByCapital('delhi));
const wcc = require('world-countries-capitals');
console.log(wcc.getCountryDetailsByName('India));
const wcc = require('world-countries-capitals');
console.log(wcc.getCountiesByLanguage('hindi));
const wcc = require('world-countries-capitals');
console.log(wcc.getAllCountryDetails());
const wcc = require('world-countries-capitals');
console.log(wcc.getAllCountries());
Please check issues here!
1.2.2 (February 08, 2020)
FAQs
A simple NPM package to get capitals, currency, native language, famous_for etc. of all the countries in the world
The npm package world-countries-capitals receives a total of 578 weekly downloads. As such, world-countries-capitals popularity was classified as not popular.
We found that world-countries-capitals 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.