New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@genyus/country-code

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@genyus/country-code

Country Data utility Library, ISO Codes etc...

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

country-code

npm version Build Status

Country Code utility Library

Features

  • English name of the Country
  • ISO 3166-1 Country number
  • ISO 3166-3 Country Codes
  • ISO 3166-2 Alpha 2 Country Codes

Installation

$ npm install @genyus/country-code

Usage

const cc = require('@genyus/country-code');
cc.find({ name: 'Algeria' });
// { name: 'Algeria',
//   alpha2: 'DZ',
//   alpha3: 'DZA',
//   isoNumeric: '012' }

cc.countries.DZA.name; // 'Algeria'

cc.countries.GBR.isoNumeric; //'826'

// nameIncludes
/**
 * options.accuracy {Number}: number from 0 - 1, a percentage of accuracy for the search,
 *                                  default (1 [exactly includes])
 **/
cc.nameIncludes('Trinidad', { accuracy: 0.7 });
/**
 [
  {
    name: 'Trinidad and Tobago',
    alpha2: 'TT',
    alpha3: 'TTO',
    isoNumeric: '780',
  },
 ]
 **/

Notes:

Breaking changes:

  • some country names were renamed with the original values put in a property called countryName

Keywords

FAQs

Package last updated on 31 May 2019

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