1.0.5 • Published 7 months ago

@cloudblueconnect/country-flag-mapper v1.0.5

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 months ago

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.

1.0.5

7 months ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago