1.0.0 • Published 10 months ago

ccctf v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

Convert Country Code To Flag

How can install?

npm i ccctf

Usage

The main feature of this library is to create a country's flag using the country's phone code, and other applications such as receiving a list of countries with the same code, receiving the country's code with the country's name, etc.

example

  • code:
import ccctf from 'ccctf/src/index.ts'

const usFlag = ccctf('us') 

console.log(usFlag)

// '🇺🇸'
import { gcc } from 'ccctf/src/index.ts'

const usCode = gcc('us') 

console.log(usCode)

// '+1'
import { gcnbc } from 'ccctf/src/index.ts'

const listOfCountriesWithCodeIs_1 = gcnbc('+1') 
const listOfCountriesWithCodeIs_90 = gcnbc('+90') 

console.log(listOfCountriesWithCodeIs_1)
console.log(listOfCountriesWithCodeIs_90)

// ['CA', 'US']
// ['TR']
1.0.0

10 months ago

0.0.0

10 months ago