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 🙏

© 2024 – Pkg Stats / Ryan Hefner

country-select

v1.1.1

Published

``` <template> <div> <LanguageSelect :countries="countries" :onchange="changeLanguage"/> </div> </template>

Downloads

26

Readme

Usage

<template>
    <div>
        <LanguageSelect :countries="countries" :onchange="changeLanguage"/>
    </div>
</template>


<script>
import LanguageSelect from 'country-select'
export default {
    components:{
        LanguageSelect
    },
    data(){
        return {
            countries:[
                {
                    title:'GB',             // national flag
                    text: 'English',        // country name
                    value: 'en',            // will return on onchange callback
                    select: localStorage.getItem('locale')=='en'?1:0    // default country select
                },
                {
                    title:'CN',
                    text: 'Chinese',
                    value: 'zh',
                    select: localStorage.getItem('locale')=='zh'?1:0
                }
            ]
        }
    }
}
<script>

National flag optional

AC--America
AD--Andorra
AE--United Arab Emirates
AF--Afghanistan
AG--Antigua and Barbuda
AL--Albania
AM--Armenia
AO--Angola
AR--Argentina
AT--Austria
AU--Australia
AW--Aruba
AZ--Azerbaijan
BA--Bosnia and Herzegovina
BB--Barbados
BD--Bangladesh
BE--Belgium
BF--Burkina Faso
BG--Bulgaria
BH--Bahrain
BI--Burundi
BJ--Benin
BM--Bermuda
BN--Brunei
BO--Bolivia
BR--Brazil
BS--Bahamas
BT--Bhutan
BW--Botswana
BY--Belarus
BZ--Belize
CA--Canada
CD--Democratic Republic of the Congo
CF--Central African Republic
CG--Democratic Republic of the Congo
CH--Switzerland
CL--Chile
CM--Cameroon
CN" selected="selected">China
CO--Colombia
CR--Costa Rica
CU--Cuba
CV--Cape Verde
CY--Cyprus
CZ--Czech Republic
DE--Germany
DJ--Djibouti
DK--Denmark
DM--Dominica
DO--Dominican Republic
DZ--Algeria
EC--Ecuador
EE--Estonia
EG--Egypt
ER--Eritrea
ES--Spain
ET--Ethiopia
FI--Finland
FJ--Fiji
FK--Falkland Islands
FM--Micronesia
FO--Faroe Islands
FR--France
GA--Gabon
GB--United Kingdom
GD--Grenada
GE--Georgia
GH--Ghana
GI--Gibraltar
GM--Gambia
GN--Guinea
GQ--Equatorial Guinea
GR--Greece
GT--Guatemala
GW--Guinea-Bissau
GY--Guyana
HK--Hong Kong
HN--Honduras
HR--Croatia
HT--Haiti
HU--Hungary
ID--Indonesia
IE--Ireland
IL--Israel
IN--India
IQ--Iraq
IR--Iran
IS--Iceland
IT--Italy
JM--Jamaica
JO--Jordan
JP--Japan
KE--Kenya
KG--Kyrgyzstan
KH--Cambodia
KI--Kiribati
KM--Comoros
KN--Saint Kitts and Nevis
KP--North Korea
KR--South Korea
KW--Kuwait
KY--Cayman Islands
KZ--Kazakhstan
LA--Laos
LB--Lebanon
LC--Saint Lucia
LI--Liechtenstein
LK--Sri Lanka
LR--Liberia
LS--Lesotho
LT--Lithuania
LU--Luxembourg
LV--Latvia
LY--Libya
MA--Morocco
MC--Monaco
MD--Moldova
ME--Montenegro
MG--Madagascar
MK--Macedonia
ML--Mali
MM--Myanmar
MN--Mongolia
MO--Macao
MR--Mauritania
MT--Malta
MU--Mauritius
MV--Maldives
MW--Malawi
MX--Mexico
MY--Malaysia
MZ--Mozambique
NA--Namibia
NE--Niger
NG--Nigeria
NI--Nicaragua
NL--Netherlands
NO--Norway
NP--Nepal
NR--Nauru
NZ--New Zealand
OM--Oman
PA--Panama
PE--Peru
PG--Papua New Guinea
PH--Philippines
PK--Pakistan
PL--Poland
PR--Puerto Rico
PS--Palestine
PT--Portugal
PW--Palau
PY--Paraguay
QA--Qatar
RO--Romania
RS--Serbia
RU--Russia
RW--Rwanda
SA--Saudi Arabia
SB--Solomon Islands
SC--Seychelles
SD--Sudan
SE--Sweden
SG--Singapore
SI--Slovenia
SK--Slovak Republic
SL--Sierra Leone
SM--San Marino
SN--Senegal
SO--Somalia
SR--Suriname
ST--Sao Tome and Principe
SV--El Salvador
SY--Syria
SZ--Swaziland
TD--Chad
TG--Togo
TH--Thailand
TJ--Tajikistan
TM--Turkmenistan
TN--Tunisia
TO--Tonga
TR--Turkey
TT--Trinidad and Tobago
TV--Tuvalu
TZ--Tanzania
UA--Ukraine
UG--Uganda
UY--Uruguay
UZ--Uzbekistan
VC--Saint Vincent And The Grenadine
VE--Venezuela
VG--British Virgin Islands
VN--Vietnam
VU--Vanuatu
WF--Wallis and Futuna
WS--Western Samoa
YE--Yemen
ZA--South Africa
ZM--Zambia
ZW--Zimbabwe