
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
ac-countrylist
Advanced tools
This is a little helper to retrieve a countrylist and query this countrylist.
This is a little helper to retrieve a countrylist and query this countrylist.
The countrylist is forked from https://gist.github.com/stefanbauer/bf0720c6846a3cc9b59e
You can use the countrylist directly by importing countrylist.js. But it is recommended to use this little helper and require this module.
const acCountryList = require('ac-countrylist')
Return a short list with iso2, country name and spoken languages.
const list = acCountryList.showList()
// -> [{ name: 'Afghanistan',
iso2: 'af',
alpha2Code: 'af',
languages: [ 'ps', 'uz', 'tk' ] }, ...]
Query the country list (currently only iso2 and iso3 is supported)
const country = acCountryList.query({ iso2: 'de' })
// OR
const country = acCountryList.query({ iso3: 'deu' })
// -> { name: 'Germany',
capital: 'Berlin',
altSpellings:
[ 'DE',
'Federal Republic of Germany',
'Bundesrepublik Deutschland' ],
relevance: '3',
region: 'Europe',
subregion: 'Western Europe',
translations:
{ de: 'Deutschland',
es: 'Alemania',
fr: 'Allemagne',
ja: 'ドイツ',
it: 'Germania' },
population: 81083600,
latlng: [ 51, 9 ],
demonym: 'German',
area: 357114,
gini: 28.3,
timezones: [ 'UTC+01:00' ],
borders:
[ 'AUT', 'BEL', 'CZE', 'DNK', 'FRA', 'LUX', 'NLD', 'POL', 'CHE' ],
nativeName: 'Deutschland',
callingCodes: [ '49' ],
topLevelDomain: [ '.de' ],
alpha2Code: 'DE',
alpha3Code: 'DEU',
currencies: [ 'EUR' ],
languages: [ 'de' ] }
Return a random country
const randomCountry = acCountryList.random()
//
{ name: 'Afghanistan',
iso2: 'af',
alpha2Code: 'af',
languages: [ 'ps', 'uz', 'tk' ]
}
MIT License Copyright © 2009-present, AdmiralCloud, Mark Poepping
FAQs
This is a little helper to retrieve a countrylist and query this countrylist.
The npm package ac-countrylist receives a total of 193 weekly downloads. As such, ac-countrylist popularity was classified as not popular.
We found that ac-countrylist demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.