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!
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.