fetch-country-flag
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Fetch Country Flag

Simple package to fetch flag of any country by name.

Features

  • Easy
  • Simple
  • Fast
  • TypeScript Support

Example

const flag = require("fetch-country-flag");
 
const data = await flag("usa", {
    type: "png",
    theme: "flat",
    size: "64"
});
 
console.table(data);
 
/*
Expected Output:
┌─────────┬──────────────────────────────────────────────┐
│ (index) │                    Values                    │
├─────────┼──────────────────────────────────────────────┤
│  name   │          'United States of America'          │
│  flag   │ 'https://www.countryflags.io/US/flat/64.png' │
└─────────┴──────────────────────────────────────────────┘
*/
 

Join My Discord

https://discord.gg/2SUybzb

Package Sidebar

Install

npm i fetch-country-flag

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.62 kB

Total Files

5

Last publish

Collaborators

  • snowflake7