npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

country-list-l

v2.3.0

Published

country list

Downloads

51

Readme

country-list(中文简体,中文繁体)(可以直接复制country.json自己玩)

Example

var countries = require('country-list-l');

console.log(countries.getCountryList().length); 
console.log(countries.getCountryByName('China')); 

lang: 默认英文,简体-'cn',繁体-'tc'

Methods

getCountries(lang,option)

获取国家或地区列表

option --> {continent:'',type:''} 当前提供查询条件

  • continent(大洲): AS(亚洲) | AF(非洲) | EU(欧洲) | NA(北美洲) | SA(南美洲) | OA(大洋洲) | AN(南极洲)
  • type(国家类型): UNSC(联合国系统国家) | NUNC(非联合国系统国家) | ODOSAA(海外属地与其他特殊政区)
countries.getCountries('cn', { continent: 'AS', type: 'UNSC' }); 

getCountryListKV(key,value)

返回一个自定义键值对的对象(参数列表:['name', 'traditionalName', 'chineseName', 'alpha_2', 'alpha_3', 'numericCode'])

countries.getCountryListKV('alpha_3', 'chineseName'); // {AFG: '阿富汗', ALB: '阿尔巴尼亚', DZA: '阿尔及利亚' ...}  

getCountryList(lang)

返回所有国家和地区列表

getCountryByName(name)

通过国家名称查询国家信息

Install

npm install country-list-l

License

MIT