Skip to content

Latest commit

 

History

History
63 lines (42 loc) · 791 Bytes

README.md

File metadata and controls

63 lines (42 loc) · 791 Bytes

Install

npm install area-code-list
yarn add area-code-list

Usage

import countries from "area-code-list";

Get name of the country

name = countries.getCountryByName("阿富汗");

Get code of the country

code = countries.getCountryByCode("+93");

Get list of all country names

names = countries.getCountries();

Get name of the ShortName

name = countries.getCountriesByShortName("AF");

Get code of the En

code = countries.getEnToCountry("Afghanistan");

Get list of all GroupEn

names = countries.getGroupEnToCountry("A");

Get list of all GroupCn

names = countries.getGroupCnToCountry("A");

Inspired by 灵感来自

  • @datasets/country-list