country-fetcher

1.0.1 • Public • Published

Project Name

A brief description of your Node.js package and what it does.

Installation

You can install this package using npm. Open your terminal and run the following command:

npm install country-fetcher

Usage

Here's how you can use this package in your Node.js application:

Node.js

const getCountry = require('country-fetcher');

If you are using Typescript

import { getCountry } from "country-fetcher";

Features

It helps getting country information using

  • Full Name: United States of America
  • Alpha 2: US
  • Alpha 3: USA
  • Alternate Name:: United States

API Documentation

Use getCountry method to get the information.

getCountry(name) It searches country in case insensitive manner.

name: Name/Alpha2/Alpha3/Alternate Name of the country

Example

Below is the example how to use it.

const getCountry = require('country-fetcher');

const country1 = getCountry('United States of America'); // OR getCountry('United States'); OR getCountry('US'); OR getCountry('USA');
console.log(country1); // Output: {}

Package Sidebar

Install

npm i country-fetcher

Weekly Downloads

3

Version

1.0.1

License

ISC

Unpacked Size

75.4 kB

Total Files

5

Last publish

Collaborators

  • pradip_sabhadiya