@cloudblueconnect/country-flag-mapper

1.0.5 • Public • Published

Country flag mapper

This package provides country flags as SVG icons, in a square (1x1) aspect ratio, mapped to country and locale IDs.

The flags are sourced from the flag-icons library.

Installation

npm install --save @cloudblueconnect/country-flag-mapper

Usage

import {
  flags,
  locales,
  localeFlags,
} from '@cloudblueconnect/country-flag-mapper';

// Getting Portugal's flag
const PORTUGAL_FLAG = flags.PT;

// Getting the icon for the spanish locale
const SPANISH_LANGUAGE_ICON = localeFlags.es;

// Getting the icon for a different spanish locale
const ARGENTINIAN_SPANISH_ICON = localeFlags[locales.ARGENTINIAN_SPANISH];

License

@cloudblueconnect/country-flag-mapper is licensed under the Apache License 2.0.

Package Sidebar

Install

npm i @cloudblueconnect/country-flag-mapper

Weekly Downloads

3

Version

1.0.5

License

Apache-2.0

Unpacked Size

34.9 kB

Total Files

7

Last publish

Collaborators

  • marcserrat
  • ffaraoneim
  • connectsteam