Nothing's plumb meaningless

    emoji-country-code

    1.1.0 • Public • Published

    emoji-country-code

    Transform ISO 3166-1 country codes to Emoji flags

    Installation

    Installation is the same as any other npm module.

    yarn add emoji-country-code

    or

    npm install --save emoji-country-code

    Usage

    In an ES6+ environment you can either import the named export

    import { fromCountryCode } from 'emoji-country-code'

    or use the default export

    import flagEmoji from 'emoji-country-code'

    CommonJS and UMD builds are available as well.

    API

    To transform a country code like BD to 🇧🇩, just call the fromCountryCode function

    const flag = flagEmoji.fromCountryCode('BD') //=> 🇧🇩

    That's about it! Use it however you like 🚀


    This project follows
    JavaScript Style Guide

    Install

    npm i emoji-country-code

    DownloadsWeekly Downloads

    8

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    10.5 kB

    Total Files

    16

    Last publish

    Collaborators

    • fa7ad