Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/country-list

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/country-list

TypeScript definitions for country-list

  • 1.1.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/country-list

Summary

This package contains type definitions for country-list (https://github.com/fannarsh/country-list).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/country-list/v1.

index.d.ts

export default function Countries(): {
    /**
     * Expects a two-digit country code. Returns the name for that country. If not found, it returns undefined.
     */
    getName(code: string): string | undefined;

    /**
     * Expects the English country name. Returns the code for that country. If not found, it returns undefined.
     */
    getCode(name: string): string | undefined;

    /**
     * Returns an array of all country names.
     */
    getNames(): string[];

    /**
     * Returns an array of all country codes.
     */
    getCodes(): string[];

    /**
     * Returns a key-value object of all countries using the name as key.
     */
    getNameList(): { [name: string]: string };

    /**
     * Returns a key-value object of all countries using the code as key.
     */
    getCodeList(): { [code: string]: string };

    /**
     * Returns an array of all country information, in the same format as it gets imported.
     */
    getData(): Array<{ code: string; name: string }>;
};

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Kyle Roach.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc