MJdiop / country-flag-code

A package that transforms a country code into a flag

Home Page:https://www.npmjs.com/package/country-flag-code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

country-flag-code

A package that transforms a country code into a flag

Install country-flag-code:

npm i country-flag-code

# or

yarn add country-flag-code

Usage:

import { countryCode } from 'country-flag-code';

function MyComponent() {
  const flag = countryCode('sn');

  return (
    <>
      Country {flag} => '🇸🇳'
    </>
  );
}

About

A package that transforms a country code into a flag

https://www.npmjs.com/package/country-flag-code


Languages

Language:TypeScript 100.0%