Socket
Socket
Sign inDemoInstall

country-code-lookup

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

country-code-lookup - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

.travis.yml

19

index.js

@@ -6,4 +6,4 @@

var path = require('path');
var data = require('fs').readFileSync(path.join(__dirname, 'country-codes.csv')).toString().split('\r\n');
var data = require('fs').readFileSync(path.join(__dirname, 'country-codes.csv')).toString().split('\n');
var headings = data[0].split(',');

@@ -15,3 +15,3 @@

for (var j = 0; j < headings.length; j++){
country[headings[j]] = parts[j];
country[headings[j].trim()] = parts[j].trim();
}

@@ -31,12 +31,12 @@ countries.push(country);

if (!isNaN(parseInt(code))){
return search('isoNo', code.toString());
return search('isoNo', code.toString());
}
if (code.length === 2){
return search('iso2', code.toUpperCase());
}
return search('iso2', code.toUpperCase());
}
if (code.length === 3){
return search('iso3', code.toUpperCase());
}
return search('iso3', code.toUpperCase());
}

@@ -58,2 +58,1 @@ throw new Error("cannot determine ISO code type");

}
{
"name": "country-code-lookup",
"version": "0.0.3",
"version": "0.0.4",
"description": "Finds countries by various country codes",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -0,1 +1,3 @@

[![Build Status](https://travis-ci.org/richorama/country-code-lookup.svg?branch=master)](https://travis-ci.org/richorama/country-code-lookup)
# Country Code Lookup

@@ -56,2 +58,1 @@

MIT
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