JSPM

country-flags-svg-alpha

1.0.8
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 3
    • Score
      100M100P100Q29637F
    • License MIT

    A list of countries with url links to a svg image which you can simply use in your web application

    Package Exports

    • country-flags-svg-alpha

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (country-flags-svg-alpha) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    country-flags-svg-alpha !!! Do not use me !!!

    A list of countries with url links to a svg image which you can simply use in your web application

    NPM

    Travis Coveralls npm

    Install

    $ npm install country-flags-svg

    or

    $ yarn add country-flags-svg

    Usage

    import { findFlagUrlByNationality } from "country-flags-svg";
    
    const flagUrl = findFlagUrlByNationality("Australian");
    // => "http://upload.wikimedia.org/wikipedia/commons/8/88/Flag_of_Australia_%28converted%29.svg"
    
    import { countries } from "country-flags-svg";
    
    const australia = countries[0];
    
    console.log(australia);
    /* => {
            name: "Australia",
            demonym: "Australian",
            flag: "http://upload.wikimedia.org/wikipedia/commons/8/88/Flag_of_Australia_%28converted%29.svg",
            iso2: "AU",
            iso3: "AUS",
        }
    */

    API

    countries

    Returns all available information.

    findFlagUrlByCountryName(countryName)

    Returns SVG link of the official flag for a specified country (according to countryName) or empty string if is not exist

    findFlagUrlByNationality(nationality)

    Returns SVG link of the official flag for a specified country (according to nationality) or empty string if is not exist

    findFlagUrlByIso2Code(iso2Code)

    Returns SVG link of the official flag for a specified country (according to ISO 3166-1 alpha-2 code) or empty string if is not exist

    findFlagUrlByIso3Code(iso3Code)

    Returns SVG link of the official flag for a specified country (according to ISO 3166-1 alpha-3 code) or empty string if is not exist

    Available Flags*

    Aruba
    Flag of Aruba
    Australia
    Flag of Australia
    Austria
    Flag of Austria
    Azerbaijan
    Flag of Azerbaijan
    Bangladesh
    Flag of Bangladesh
    Bahrain
    Flag of Bahrain
    Belgium
    Flag of Belgium
    Brazil
    Flag of Brazil
    Canada
    Flag of Canada
    Chile
    Flag of Chile
    China
    Flag of China
    Colombia
    Flag of Colombia
    Croatia
    Flag of Croatia
    Cyprus
    Flag of Cyprus
    Czech Republic
    Flag of Czech Republic
    Denmark
    Flag of Denmark
    Europe
    Flag of Europe
    Estonia
    Flag of Estonia
    Fiji
    Flag of Fiji
    Finland
    Flag of Finland
    France
    Flag of France
    Germany
    Flag of Germany
    Greece
    Flag of Greece
    Hong Kong
    Flag of Hong Kong
    Hungary
    Flag of Hungary
    India
    Flag of India
    Indonesia
    Flag of Indonesia
    Ireland
    Flag of Ireland
    Italy
    Flag of Italy
    Japan
    Flag of Japan
    Latvia
    Flag of Latvia
    Liechtenstein
    Flag of Liechtenstein
    Lithuania
    Flag of Lithuania
    Luxembourg
    Flag of Luxembourg
    Malaysia
    Flag of Malaysia
    Mauritius
    Flag of Mauritius
    Mexico
    Flag of Mexico
    Monaco
    Flag of Monaco
    Montenegro
    Flag of Montenegro
    Nepal
    Flag of Nepal
    Netherlands
    Flag of Netherlands
    New Zealand
    Flag of New Zealand
    Norway
    Flag of Norway
    Panama
    Flag of Panama
    Philippines
    Flag of Philippines
    Poland
    Flag of Poland
    Portugal
    Flag of Portugal
    Russia
    Flag of Russia
    Singapore
    Flag of Singapore
    Sri Lanka
    Flag of Sri Lanka
    Slovakia
    Flag of Slovakia
    Slovenia
    Flag of Slovenia
    South Africa
    Flag of South Africa
    South Korea
    Flag of South Korea
    Spain
    Flag of Spain
    Sweden
    Flag of Sweden
    Switzerland
    Flag of Switzerland
    Thailand
    Flag of Thailand
    Turkey
    Flag of Turkey
    Ukraine
    Flag of Ukraine
    United Kingdom
    Flag of United Kingdom
    United States
    Flag of United States
    United Arab Emirates
    Flag of United Arab Emirates
    Uruguay
    Flag of Uruguay
    Venezuela
    Flag of Venezuela
    Vietnam
    Flag of Vietnam
    Zimbabwe
    Flag of Zimbabwe
    * - if not enough don't be shy and provide merge request ;)

    License

    Licensed under MIT.