From 68f2ba9f0c78b1a432422adf0cc1be70af6935a0 Mon Sep 17 00:00:00 2001 From: "Javed Khan (164328)" Date: Sun, 4 Oct 2020 15:20:12 +0530 Subject: [PATCH 1/5] adding landlocked property --- README.md | 46 ++- data/data.json | 588 ++++++++++++++++++++++++++------------- index.js | 15 + package-lock.json | 2 +- spec/getCountriesSpec.js | 45 +++ 5 files changed, 498 insertions(+), 198 deletions(-) diff --git a/README.md b/README.md index 44f7af9..93f33da 100644 --- a/README.md +++ b/README.md @@ -205,7 +205,7 @@ This section contains nt to _contribute_ to open source? Try solving our issues --- - `getCountriesByFamousFor(famousThing)`
- This method returns an array of objects, each object containing **country**, **capital**, **currency**, **native_language**, **famouse_for**, **phone_code**, and **flag** sorted by the _famousThing_ passed as the parameter.
+ This method returns an array of objects, each object containing **country**, **capital**, **currency**, **native_language**, **famous_for**, **phone_code**, and **flag** sorted by the _famousThing_ passed as the parameter.
Response for getCountriesByFamousFor('oil') ```javascript @@ -266,6 +266,38 @@ This section contains nt to _contribute_ to open source? Try solving our issues }, ]; ``` +--- + +- `getCountriesByLandLock(isLandLocked: boolean)`
+ This method returns an array of objects, each object containing **country**, **capital**, **currency**, **native_language**, **famous_for**, **phone_code**, **flag**, **drive_direction** and **is_landlocked** sorted by the _isLandlocked property which is boolean_ passed as the parameter.
+ Response for getCountriesByLandLock(true) + + ```javascript + [ + { + country: 'afghanistan', + capital: 'kabul', + currency: 'afghani', + native_language: ['dari persian', 'pashto'], + famous_for: 'rugs, taliban', + phone_code: '+93', + flag: 'https://flagpedia.net/data/flags/h80/af.png', + drive_direction: 'right', + is_landlocked: true + }, + { + country: 'andorra', + capital: 'andorra la vella', + currency: 'euro', + native_language: ['catalan'], + famous_for: 'tourism and tobacco', + phone_code: '+244', + flag: 'https://flagpedia.net/data/flags/h80/ad.png', + drive_direction: 'right', + is_landlocked: true + } + ]; + ``` # Example Use Cases @@ -371,6 +403,18 @@ console.log(wcc.getCountriesByFamousFor("oil")); --- +### Example #9 + +> Get the details of all `countries` that are '_landlocked_'. + +```javascript +const wcc = require("world-countries-capitals"); + +console.log(wcc.getCountriesByLandLock(true)); +``` + +--- + ## Demo In this [Vue.js demo](https://codesandbox.io/s/wcc-demo-tux1b), the package methods are used to search countries by a selected field (name, capital, language, famous for) diff --git a/data/data.json b/data/data.json index 26205bc..88d3a8a 100644 --- a/data/data.json +++ b/data/data.json @@ -7,7 +7,8 @@ "famous_for": "rugs, taliban", "phone_code": "+93", "flag": "https://flagpedia.net/data/flags/h80/af.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "albania", @@ -17,7 +18,8 @@ "famous_for": "mother teresa", "phone_code": "+355", "flag": "https://flagpedia.net/data/flags/h80/al.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "algeria", @@ -27,7 +29,8 @@ "famous_for": "oil and gas reserves", "phone_code": "+213", "flag": "https://flagpedia.net/data/flags/h80/dz.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "andorra", @@ -37,7 +40,8 @@ "famous_for": "tourism and tobacco", "phone_code": "+376", "flag": "https://flagpedia.net/data/flags/h80/ad.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "angola", @@ -47,7 +51,8 @@ "famous_for": "oil", "phone_code": "+244", "flag": "https://flagpedia.net/data/flags/h80/ao.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "antigua & barbuda", @@ -57,7 +62,8 @@ "famous_for": "spectacular racing and rum", "phone_code": "+1-268", "flag": "https://flagpedia.net/data/flags/h80/ag.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "argentina", @@ -67,7 +73,8 @@ "famous_for": "Football", "phone_code": "+54", "flag": "https://flagpedia.net/data/flags/h80/ar.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "armenia", @@ -77,7 +84,8 @@ "famous_for": "genocide and kim kardashian", "phone_code": "+374", "flag": "https://flagpedia.net/data/flags/h80/am.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "australia", @@ -87,7 +95,8 @@ "famous_for": "koalas and kangaroos", "phone_code": "+61", "flag": "https://flagpedia.net/data/flags/h80/au.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "austria", @@ -97,7 +106,8 @@ "famous_for": "hitler, mozart, redbull, franz ferdinand and arnold schwarzenegger", "phone_code": "+43", "flag": "https://flagpedia.net/data/flags/h80/at.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "azerbaijan", @@ -107,7 +117,8 @@ "famous_for": "burning mountain", "phone_code": "+994", "flag": "https://flagpedia.net/data/flags/h80/az.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "the bahamas", @@ -117,7 +128,8 @@ "famous_for": "scenic beauty and year-round tropical weather", "phone_code": "+1-242", "flag": "https://flagpedia.net/data/flags/h80/bs.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "bahrain", @@ -127,7 +139,8 @@ "famous_for": "oil, pearls and world heritage sites", "phone_code": "+973", "flag": "https://flagpedia.net/data/flags/h80/bh.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "bangladesh", @@ -137,7 +150,8 @@ "famous_for": "cox's bazar sea", "phone_code": "+880", "flag": "https://flagpedia.net/data/flags/h80/bd.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "barbados", @@ -147,7 +161,8 @@ "famous_for": "flying fish", "phone_code": "+1-246", "flag": "https://flagpedia.net/data/flags/h80/bb.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "belarus", @@ -157,7 +172,8 @@ "famous_for": "Variety of sweets", "phone_code": "+375", "flag": "https://flagpedia.net/data/flags/h80/by.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "belgium", @@ -167,7 +183,8 @@ "famous_for": "chocolates, waffles, fries and beer", "phone_code": "+32", "flag": "https://flagpedia.net/data/flags/h80/be.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "belize", @@ -177,7 +194,8 @@ "famous_for": "scuba diving sites", "phone_code": "+501", "flag": "https://flagpedia.net/data/flags/h80/bz.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "benin", @@ -187,7 +205,8 @@ "famous_for": "bronzes - brass work", "phone_code": "+229", "flag": "https://flagpedia.net/data/flags/h80/bj.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "bhutan", @@ -197,7 +216,8 @@ "famous_for": "natural beauty, forest conservation, great culture and heritage", "phone_code": "+975", "flag": "https://flagpedia.net/data/flags/h80/bt.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": true }, { "country": "bolivia", @@ -207,7 +227,8 @@ "famous_for": "salar de uyuni", "phone_code": "+591", "flag": "https://flagpedia.net/data/flags/h80/bo.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "bosnia and herzegovina", @@ -217,7 +238,8 @@ "famous_for": "natural environment and cultural heritage", "phone_code": "+387", "flag": "https://flagpedia.net/data/flags/h80/ba.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "botswana", @@ -227,7 +249,8 @@ "famous_for": "safari destinations", "phone_code": "+267", "flag": "https://flagpedia.net/data/flags/h80/bw.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": true }, { "country": "brazil", @@ -237,7 +260,8 @@ "famous_for": "soccer and football", "phone_code": "+55", "flag": "https://flagpedia.net/data/flags/h80/br.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "brunei", @@ -247,7 +271,8 @@ "famous_for": "gorgeous mosques and islamic architecture", "phone_code": "+673", "flag": "https://flagpedia.net/data/flags/h80/bn.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "bulgaria", @@ -257,7 +282,8 @@ "famous_for": "lavender oil and the rose valley", "phone_code": "+359", "flag": "https://flagpedia.net/data/flags/h80/bg.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "burkina faso", @@ -267,7 +293,8 @@ "famous_for": "african art and culture", "phone_code": "+226", "flag": "https://flagpedia.net/data/flags/h80/bf.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "burundi", @@ -277,7 +304,8 @@ "famous_for": "wildlife and greenery", "phone_code": "+257", "flag": "https://flagpedia.net/data/flags/h80/bi.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "cambodia", @@ -287,7 +315,8 @@ "famous_for": "angkor wat hindu temple", "phone_code": "+855", "flag": "https://flagpedia.net/data/flags/h80/kh.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "cameroon", @@ -297,7 +326,8 @@ "famous_for": "coffee, cocoa, cotton and oilseeds", "phone_code": "+237", "flag": "https://flagpedia.net/data/flags/h80/cm.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "canada", @@ -307,7 +337,8 @@ "famous_for": "mapple syrup, mapple trees, politeness and hockey", "phone_code": "+1", "flag": "https://flagpedia.net/data/flags/h80/ca.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "cape verde", @@ -317,7 +348,8 @@ "famous_for": "warm tropical climate, volcanic islands, wonderful musicians", "phone_code": "+238", "flag": "https://flagpedia.net/data/flags/h80/cv.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "central african republic", @@ -327,7 +359,8 @@ "famous_for": "diamonds, gold, oil and uranium", "phone_code": "+236", "flag": "https://flagpedia.net/data/flags/h80/cf.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "chad", @@ -337,7 +370,8 @@ "famous_for": "chad lake", "phone_code": "+235", "flag": "https://flagpedia.net/data/flags/h80/td.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "chile", @@ -347,7 +381,8 @@ "famous_for": "country of poets", "phone_code": "+56", "flag": "https://flagpedia.net/data/flags/h80/cl.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "china", @@ -357,7 +392,8 @@ "famous_for": "kung fu, spitting habit, panda, cheap electronics", "phone_code": "+86", "flag": "https://flagpedia.net/data/flags/h80/cn.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "colombia", @@ -367,7 +403,8 @@ "famous_for": "mines of muzo, chivor and coscuez", "phone_code": "+57", "flag": "https://flagpedia.net/data/flags/h80/co.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "comoros", @@ -377,7 +414,8 @@ "famous_for": "fragrant plant life and scenic beauty", "phone_code": "+269", "flag": "https://flagpedia.net/data/flags/h80/km.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "democratic republic of the congo", @@ -387,7 +425,8 @@ "famous_for": "diamonds, cobalt and copper", "phone_code": "+243", "flag": "https://flagpedia.net/data/flags/h80/dr.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "republic of the congo (congo-brazzaville)", @@ -397,7 +436,8 @@ "famous_for": "natural resources", "phone_code": "+242", "flag": "https://flagpedia.net/data/flags/h80/cg.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "costa rica", @@ -407,7 +447,8 @@ "famous_for": "coffee beans", "phone_code": "+506", "flag": "https://flagpedia.net/data/flags/h80/cr.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "cote d'ivoire (ivory coast)", @@ -417,7 +458,8 @@ "famous_for": "religious and ethnic harmony", "phone_code": "+225", "flag": "https://flagpedia.net/data/flags/h80/ci.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "croatia", @@ -427,7 +469,8 @@ "famous_for": "game of thrones, stunning natural beauty and 6000km long coast", "phone_code": "+385", "flag": "https://flagpedia.net/data/flags/h80/hr.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "cuba", @@ -437,7 +480,8 @@ "famous_for": "beaches, rum, cigars, fascinating architecture", "phone_code": "+53", "flag": "https://flagpedia.net/data/flags/h80/cu.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "cyprus", @@ -447,7 +491,8 @@ "famous_for": "incredible scenery and history", "phone_code": "+357", "flag": "https://flagpedia.net/data/flags/h80/cy.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "czechia", @@ -457,7 +502,8 @@ "famous_for": "museums, puppetry, marionette exhibitions and folk festivals", "phone_code": "+420", "flag": "https://flagpedia.net/data/flags/h80/cz.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "denmark", @@ -467,7 +513,8 @@ "famous_for": "pig meat, healthcare, pastries and cuisine", "phone_code": "+45", "flag": "https://flagpedia.net/data/flags/h80/dk.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "djibouti", @@ -477,7 +524,8 @@ "famous_for": "amazing landscapes, limestone vents and flamingos", "phone_code": "+253", "flag": "https://flagpedia.net/data/flags/h80/dj.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "dominica", @@ -487,7 +535,8 @@ "famous_for": "boiling lake", "phone_code": "+1-767", "flag": "https://flagpedia.net/data/flags/h80/dm.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "dominican republic", @@ -497,7 +546,8 @@ "famous_for": "blue ocean water, white-sand beaches and beautiful resorts", "phone_code": "+1-809, +1-829, +1-849", "flag": "https://flagpedia.net/data/flags/h80/do.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "east timor (timor-leste)", @@ -507,7 +557,8 @@ "famous_for": "rich culture and beautiful beaches", "phone_code": "+670", "flag": "https://flagpedia.net/data/flags/h80/tl.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "ecuador", @@ -517,7 +568,8 @@ "famous_for": "home to galapagos islands", "phone_code": "+593", "flag": "https://flagpedia.net/data/flags/h80/ec.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "egypt", @@ -527,7 +579,8 @@ "famous_for": "pyramids, sphinx, ai aqsa university and mummies", "phone_code": "+20", "flag": "https://flagpedia.net/data/flags/h80/eg.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "el salvador", @@ -537,7 +590,8 @@ "famous_for": "land of volcanoes", "phone_code": "+503", "flag": "https://flagpedia.net/data/flags/h80/sv.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "equitorial guinea", @@ -547,7 +601,8 @@ "famous_for": "spanish speaking country in africa", "phone_code": "+240", "flag": "https://flagpedia.net/data/flags/h80/gq.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "eritrea", @@ -557,7 +612,8 @@ "famous_for": "coastal location in history and culture", "phone_code": "+291", "flag": "https://flagpedia.net/data/flags/h80/er.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "estonia", @@ -567,7 +623,8 @@ "famous_for": "medieval architecture", "phone_code": "+372", "flag": "https://flagpedia.net/data/flags/h80/ee.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "ethiopia", @@ -577,7 +634,8 @@ "famous_for": "cradle of mankind", "phone_code": "+251", "flag": "https://flagpedia.net/data/flags/h80/et.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "fiji", @@ -587,7 +645,8 @@ "famous_for": "friendly people and heavenly tropical islands", "phone_code": "+679", "flag": "https://flagpedia.net/data/flags/h80/fj.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "finland", @@ -597,7 +656,8 @@ "famous_for": "glassware, littala", "phone_code": "+358", "flag": "https://flagpedia.net/data/flags/h80/fi.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "france", @@ -607,7 +667,8 @@ "famous_for": "eiffel tower, croissant, fashion, smoking and wine", "phone_code": "+33", "flag": "https://flagpedia.net/data/flags/h80/fr.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "gabon", @@ -617,7 +678,8 @@ "famous_for": "preserving the natural environment", "phone_code": "+241", "flag": "https://flagpedia.net/data/flags/h80/ga.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "the gambia", @@ -627,7 +689,8 @@ "famous_for": "beaches, home to juffure", "phone_code": "+220", "flag": "https://flagpedia.net/data/flags/h80/gm.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "georgia", @@ -637,7 +700,8 @@ "famous_for": "joseph stalin", "phone_code": "+995", "flag": "https://flagpedia.net/data/flags/h80/ge.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "germany", @@ -647,7 +711,8 @@ "famous_for": "beer, sausage, nazi and cars", "phone_code": "+49", "flag": "https://flagpedia.net/data/flags/h80/de.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "ghana", @@ -657,7 +722,8 @@ "famous_for": "lush forests, diverse animal life, cocoa and gold", "phone_code": "+223", "flag": "https://flagpedia.net/data/flags/h80/gh.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "greece", @@ -667,7 +733,8 @@ "famous_for": "ancient philosophers, ancient greek gods, sparta and orthodox christianity", "phone_code": "+30", "flag": "https://flagpedia.net/data/flags/h80/gr.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "grenada", @@ -677,7 +744,8 @@ "famous_for": "spices", "phone_code": "+1-473", "flag": "https://flagpedia.net/data/flags/h80/gd.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "guatemala", @@ -687,7 +755,8 @@ "famous_for": "volcanic landscape and fascinating mayan culture", "phone_code": "+502", "flag": "https://flagpedia.net/data/flags/h80/gt.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "guinea", @@ -697,7 +766,8 @@ "famous_for": "hydroelectric power, bauxite reserves", "phone_code": "+224", "flag": "https://flagpedia.net/data/flags/h80/gn.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "guinea-bissau", @@ -707,7 +777,8 @@ "famous_for": "transit point for latin american cocain", "phone_code": "+245", "flag": "https://flagpedia.net/data/flags/h80/gw.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "guyana", @@ -717,7 +788,8 @@ "famous_for": "pristine rainforests, sugarcane plantations, rice fields and bauxite reserves", "phone_code": "+592", "flag": "https://flagpedia.net/data/flags/h80/gy.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "haiti", @@ -727,7 +799,8 @@ "famous_for": "breathtaking beaches and crystal blue waters", "phone_code": "+509", "flag": "https://flagpedia.net/data/flags/h80/ht.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "honduras", @@ -737,7 +810,8 @@ "famous_for": "rich natural resources, tropical fruit, sugarcane, coffee and growing textiles industry", "phone_code": "+504", "flag": "https://flagpedia.net/data/flags/h80/hn.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "hungary", @@ -747,7 +821,8 @@ "famous_for": "rich natural resources and textiles", "phone_code": "+36", "flag": "https://flagpedia.net/data/flags/h80/hu.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "iceland", @@ -757,7 +832,8 @@ "famous_for": "lagest glaciers in europe", "phone_code": "+354", "flag": "https://flagpedia.net/data/flags/h80/is.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "india", @@ -767,7 +843,8 @@ "famous_for": "bollywood, yoga, hinduism, food and diversity", "phone_code": "+91", "flag": "https://flagpedia.net/data/flags/h80/in.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "indonesia", @@ -777,7 +854,8 @@ "famous_for": "bali, komodo dragon, domestic workers and rendang", "phone_code": "+62", "flag": "https://flagpedia.net/data/flags/h80/id.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "iran", @@ -787,7 +865,8 @@ "famous_for": "nuclear weapon, shia muslims, poetry, persian carpet", "phone_code": "+98", "flag": "https://flagpedia.net/data/flags/h80/ir.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "iraq", @@ -797,7 +876,8 @@ "famous_for": "saddam hussein, isis", "phone_code": "+964", "flag": "https://flagpedia.net/data/flags/h80/iq.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "republic of ireland", @@ -807,7 +887,8 @@ "famous_for": "meadows and leprechaun", "phone_code": "+353", "flag": "https://flagpedia.net/data/flags/h80/ie.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "israel", @@ -817,7 +898,8 @@ "famous_for": "jewish-majority, aliyah, al aqsa mosque, jerusalem", "phone_code": "+972", "flag": "https://flagpedia.net/data/flags/h80/il.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "italy", @@ -827,7 +909,8 @@ "famous_for": "ferrari, spaghetti, pizza, fashion, venice", "phone_code": "+39", "flag": "https://flagpedia.net/data/flags/h80/it.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "jamaica", @@ -837,7 +920,8 @@ "famous_for": "blue mountain coffee", "phone_code": "+1-876", "flag": "https://flagpedia.net/data/flags/h80/jm.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "japan", @@ -847,7 +931,8 @@ "famous_for": "politeness, anime, sushi, samurai, nitendo karate, cars and robotics", "phone_code": "+81", "flag": "https://flagpedia.net/data/flags/h80/jp.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "jordan", @@ -857,7 +942,8 @@ "famous_for": "petra", "phone_code": "+962", "flag": "https://flagpedia.net/data/flags/h80/jo.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "kazakhstan", @@ -867,7 +953,8 @@ "famous_for": "architectural marvels, the caspian sea and wild horses", "phone_code": "+7", "flag": "https://flagpedia.net/data/flags/h80/kz.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "kenya", @@ -877,7 +964,8 @@ "famous_for": "masai people, safari tourism", "phone_code": "+254", "flag": "https://flagpedia.net/data/flags/h80/ke.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "kiribati", @@ -887,7 +975,8 @@ "famous_for": "flyfishing, scuba diving and astounding seabird wildlife", "phone_code": "+686", "flag": "https://flagpedia.net/data/flags/h80/ki.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "north korea", @@ -897,7 +986,8 @@ "famous_for": "communism, kim jeong 2, nuclear weapon", "phone_code": "+850", "flag": "https://flagpedia.net/data/flags/h80/kp.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "south korea", @@ -907,7 +997,8 @@ "famous_for": "k-pop, samsung, hyundai, kia and kim chi", "phone_code": "+82", "flag": "https://flagpedia.net/data/flags/h80/kr.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "kosovo", @@ -917,7 +1008,8 @@ "famous_for": "mountains and wine", "phone_code": "+383", "flag": "https://flagpedia.net/data/flags/h80/xk.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "kuwait", @@ -927,7 +1019,8 @@ "famous_for": "victim of saddam's invasion", "phone_code": "965", "flag": "https://flagpedia.net/data/flags/h80/kw.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "kyrgyzstan", @@ -937,7 +1030,8 @@ "famous_for": "lake issyk kul", "phone_code": "+996", "flag": "https://flagpedia.net/data/flags/h80/kg.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "laos", @@ -947,7 +1041,8 @@ "famous_for": "bolaven plateau, ethnic villages", "phone_code": "+856", "flag": "https://flagpedia.net/data/flags/h80/la.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "latvia", @@ -957,7 +1052,8 @@ "famous_for": "old town, home to widest waterfall in europe", "phone_code": "+371", "flag": "https://flagpedia.net/data/flags/h80/lv.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "lebanon", @@ -967,7 +1063,8 @@ "famous_for": "rome and phoenica culture", "phone_code": "+961", "flag": "https://flagpedia.net/data/flags/h80/lb.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "lesotho", @@ -977,7 +1074,8 @@ "famous_for": "sehlabathebe national park", "phone_code": "+266", "flag": "https://flagpedia.net/data/flags/h80/ls.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": true }, { "country": "liberia", @@ -987,7 +1085,8 @@ "famous_for": "long running ruinous civil war", "phone_code": "+231", "flag": "https://flagpedia.net/data/flags/h80/lr.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "libya", @@ -997,7 +1096,8 @@ "famous_for": "sahara desert", "phone_code": "+218", "flag": "https://flagpedia.net/data/flags/h80/ly.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "liechtenstein", @@ -1007,7 +1107,8 @@ "famous_for": "unbelievable transformation from rural to wealthiest poulation within 60 years", "phone_code": "+423", "flag": "https://flagpedia.net/data/flags/h80/li.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "lithuania", @@ -1017,7 +1118,8 @@ "famous_for": "own official lithuania scent, amber on shores of baltic sea", "phone_code": "+370", "flag": "https://flagpedia.net/data/flags/h80/lt.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "luxembourg", @@ -1027,7 +1129,8 @@ "famous_for": "europe's most powerful investement management centre and steel manufacturing", "phone_code": "+352", "flag": "https://flagpedia.net/data/flags/h80/lu.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "north macedonia (the republic of north macedonia)", @@ -1037,7 +1140,8 @@ "famous_for": "great empire's history", "phone_code": "+389", "flag": "https://flagpedia.net/data/flags/h80/mk.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "madagascar", @@ -1047,7 +1151,8 @@ "famous_for": "lemurs, colourful chameleons, stunning orchids and home to flora and fauna", "phone_code": "+261", "flag": "https://flagpedia.net/data/flags/h80/mg.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "malawi", @@ -1057,7 +1162,8 @@ "famous_for": "home to largest number of fish species in the world", "phone_code": "+265", "flag": "https://flagpedia.net/data/flags/h80/mw.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": true }, { "country": "malaysia", @@ -1067,7 +1173,8 @@ "famous_for": "rendang, teh tark, nasi lemak and yuna", "phone_code": "+60", "flag": "https://flagpedia.net/data/flags/h80/my.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "maldives", @@ -1077,7 +1184,8 @@ "famous_for": "natural environment and water sports", "phone_code": "+960", "flag": "https://flagpedia.net/data/flags/h80/mv.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "mali", @@ -1087,7 +1195,8 @@ "famous_for": "salt mines", "phone_code": "+223", "flag": "https://flagpedia.net/data/flags/h80/ml.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "malta", @@ -1097,7 +1206,8 @@ "famous_for": "warm climate, architectural and historical monuments", "phone_code": "+356", "flag": "https://flagpedia.net/data/flags/h80/mt.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "marshall islands", @@ -1107,7 +1217,8 @@ "famous_for": "being fierce and hostile to strangers", "phone_code": "+692", "flag": "https://flagpedia.net/data/flags/h80/mh.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "mauritania", @@ -1117,7 +1228,8 @@ "famous_for": "large reserves of iron ore, copper, and gypsum", "phone_code": "+222", "flag": "https://flagpedia.net/data/flags/h80/mr.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "mauritius", @@ -1127,7 +1239,8 @@ "famous_for": "extinct dodo and rare species of plants and animals", "phone_code": "+230", "flag": "https://flagpedia.net/data/flags/h80/mu.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "mexico", @@ -1137,7 +1250,8 @@ "famous_for": "sombero hat, taco, aztec, salsa", "phone_code": "+52", "flag": "https://flagpedia.net/data/flags/h80/mx.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "federal states of micronesia", @@ -1147,7 +1261,8 @@ "famous_for": "manta rays, eco-tourism", "phone_code": "+691", "flag": "https://flagpedia.net/data/flags/h80/fm.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "moldova", @@ -1157,7 +1272,8 @@ "famous_for": "wine", "phone_code": "+373", "flag": "https://flagpedia.net/data/flags/h80/md.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "monaco", @@ -1167,7 +1283,8 @@ "famous_for": "high-end casinos, beautiful yachts and scenic montecarlo", "phone_code": "+377", "flag": "https://flagpedia.net/data/flags/h80/mc.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "mongolia", @@ -1177,7 +1294,8 @@ "famous_for": "siberian ibex, snow leopard, gobi bear and wild bactrian camel", "phone_code": "+976", "flag": "https://flagpedia.net/data/flags/h80/mn.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "montenegro", @@ -1187,7 +1305,8 @@ "famous_for": "montenegrin coast", "phone_code": "+377", "flag": "https://flagpedia.net/data/flags/h80/me.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "morocco", @@ -1197,7 +1316,8 @@ "famous_for": "medinas, beautiful handcrafts and traditional products", "phone_code": "+212", "flag": "https://flagpedia.net/data/flags/h80/ma.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "mozambique", @@ -1207,7 +1327,8 @@ "famous_for": "fresh seafood", "phone_code": "+258", "flag": "https://flagpedia.net/data/flags/h80/mz.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "myanmar (burma)", @@ -1217,7 +1338,8 @@ "famous_for": "greatest archeological sites and sule pagoda", "phone_code": "+95", "flag": "https://flagpedia.net/data/flags/h80/mm.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "namibia", @@ -1227,7 +1349,8 @@ "famous_for": "highest dunes and etosha national park", "phone_code": "+264", "flag": "https://flagpedia.net/data/flags/h80/na.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "nauru", @@ -1237,7 +1360,8 @@ "famous_for": "islands of banaba", "phone_code": "+674", "flag": "https://flagpedia.net/data/flags/h80/nr.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "nepal", @@ -1247,7 +1371,8 @@ "famous_for": "mountain peaks, mount everest and kanchenjunga", "phone_code": "+977", "flag": "https://flagpedia.net/data/flags/h80/np.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": true }, { "country": "netherlands", @@ -1257,7 +1382,8 @@ "famous_for": "legal drugs, tulip flowers and windmills", "phone_code": "+31", "flag": "https://flagpedia.net/data/flags/h80/nl.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "new zealand", @@ -1267,7 +1393,8 @@ "famous_for": "national rugby team", "phone_code": "+64", "flag": "https://flagpedia.net/data/flags/h80/nz.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "nicaragua", @@ -1277,7 +1404,8 @@ "famous_for": "volcanoes and lakes", "phone_code": "+505", "flag": "https://flagpedia.net/data/flags/h80/ni.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "niger", @@ -1287,7 +1415,8 @@ "famous_for": "world's largest uranium deposits", "phone_code": "+277", "flag": "https://flagpedia.net/data/flags/h80/ne.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "nigeria", @@ -1297,7 +1426,8 @@ "famous_for": "most common sub saharan tourists, petroleum production", "phone_code": "+234", "flag": "https://flagpedia.net/data/flags/h80/ng.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "norway", @@ -1307,7 +1437,8 @@ "famous_for": "oil, fjords, mountains and midnight sun", "phone_code": "+47", "flag": "https://flagpedia.net/data/flags/h80/no.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "oman", @@ -1317,7 +1448,8 @@ "famous_for": "fresh sea and air breathing", "phone_code": "+968", "flag": "https://flagpedia.net/data/flags/h80/om.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "pakistan", @@ -1327,7 +1459,8 @@ "famous_for": "producing footballs, cricket team", "phone_code": "+92", "flag": "https://flagpedia.net/data/flags/h80/pk.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "palau", @@ -1337,7 +1470,8 @@ "famous_for": "jellyfish lake", "phone_code": "+680", "flag": "https://flagpedia.net/data/flags/h80/pw.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "panama", @@ -1347,7 +1481,8 @@ "famous_for": "panama canal, birding, snorkeling and rafting", "phone_code": "+507", "flag": "https://flagpedia.net/data/flags/h80/pa.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "papa new guinea", @@ -1357,7 +1492,8 @@ "famous_for": "scuba diving and marine diversity", "phone_code": "+675", "flag": "https://flagpedia.net/data/flags/h80/pg.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "paraguay", @@ -1367,7 +1503,8 @@ "famous_for": "largest naval power", "phone_code": "+595", "flag": "https://flagpedia.net/data/flags/h80/py.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "peru", @@ -1377,7 +1514,8 @@ "famous_for": "machu picchu", "phone_code": "+51", "flag": "https://flagpedia.net/data/flags/h80/pe.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "philippines", @@ -1387,7 +1525,8 @@ "famous_for": "domestic workers, ferdinand marcos, manny pacquiao", "phone_code": "+63", "flag": "https://flagpedia.net/data/flags/h80/ph.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "poland", @@ -1397,7 +1536,8 @@ "famous_for": "pierogi and potatoes", "phone_code": "+48", "flag": "https://flagpedia.net/data/flags/h80/pl.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "portugal", @@ -1407,7 +1547,8 @@ "famous_for": "beaches, food and cristiano ronaldo", "phone_code": "+351", "flag": "https://flagpedia.net/data/flags/h80/pt.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "qatar", @@ -1417,7 +1558,8 @@ "famous_for": "qatar airlines", "phone_code": "+974", "flag": "https://flagpedia.net/data/flags/h80/qa.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "romania", @@ -1427,7 +1569,8 @@ "famous_for": "dracula", "phone_code": "+40", "flag": "https://flagpedia.net/data/flags/h80/ro.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "russia", @@ -1437,7 +1580,8 @@ "famous_for": "vodka, military, matroyshka dolls and cold climate", "phone_code": "+7", "flag": "https://flagpedia.net/data/flags/h80/ru.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "rwanda", @@ -1447,7 +1591,8 @@ "famous_for": "chimpanzee species and home of mountain gorillas", "phone_code": "+250", "flag": "https://flagpedia.net/data/flags/h80/rw.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "saint kitts and nevis", @@ -1457,7 +1602,8 @@ "famous_for": "beautiful beaches and pristine tropical forests", "phone_code": "+1-869", "flag": "https://flagpedia.net/data/flags/h80/kn.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "saint lucia", @@ -1467,7 +1613,8 @@ "famous_for": "volcanic island", "phone_code": "+1-758", "flag": "https://flagpedia.net/data/flags/h80/lc.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "saint vincent and the grenadines", @@ -1477,7 +1624,8 @@ "famous_for": "beautiful white-sand beaches and snorking", "phone_code": "+1-784", "flag": "https://flagpedia.net/data/flags/h80/vc.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "samoa", @@ -1487,7 +1635,8 @@ "famous_for": "samoan culture, music, dance and visual arts", "phone_code": "+685", "flag": "https://flagpedia.net/data/flags/h80/ws.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "san marino", @@ -1497,7 +1646,8 @@ "famous_for": "world's oldest surviving republic", "phone_code": "+378", "flag": "https://flagpedia.net/data/flags/h80/sm.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "sao tome and principe", @@ -1507,7 +1657,8 @@ "famous_for": "cocoa production", "phone_code": "+239", "flag": "https://flagpedia.net/data/flags/h80/st.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "saudi arabia", @@ -1517,7 +1668,8 @@ "famous_for": "strict rules, wahhabism, mecca and madina", "phone_code": "+966", "flag": "https://flagpedia.net/data/flags/h80/sa.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "senegal", @@ -1527,7 +1679,8 @@ "famous_for": "traditional wrestling, football and exotic dance", "phone_code": "+221", "flag": "https://flagpedia.net/data/flags/h80/sn.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "serbia", @@ -1537,7 +1690,8 @@ "famous_for": "culture, history, delicious cuisine, and nightlife", "phone_code": "+381", "flag": "https://flagpedia.net/data/flags/h80/rs.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "seychelles", @@ -1547,7 +1701,8 @@ "famous_for": "deep blue waters, white sandy beaches and honeymoon destination", "phone_code": "+248", "flag": "https://flagpedia.net/data/flags/h80/sc.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "sierra leone", @@ -1557,7 +1712,8 @@ "famous_for": "producers of titanium and bauxite, natural harbour", "phone_code": "+232", "flag": "https://flagpedia.net/data/flags/h80/sl.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "singapore", @@ -1567,7 +1723,8 @@ "famous_for": "cleanliness, marina bay and strict laws", "phone_code": "+65", "flag": "https://flagpedia.net/data/flags/h80/sg.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "slovakia", @@ -1577,7 +1734,8 @@ "famous_for": "eset and sygic", "phone_code": "+421", "flag": "https://flagpedia.net/data/flags/h80/sk.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "slovenia", @@ -1587,7 +1745,8 @@ "famous_for": "caves", "phone_code": "+386", "flag": "https://flagpedia.net/data/flags/h80/si.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "solomon islands", @@ -1597,7 +1756,8 @@ "famous_for": "world war 2", "phone_code": "+677", "flag": "https://flagpedia.net/data/flags/h80/sb.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "somalia", @@ -1607,7 +1767,8 @@ "famous_for": "frankincense and myrrh", "phone_code": "+252", "flag": "https://flagpedia.net/data/flags/h80/so.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "south africa", @@ -1617,7 +1778,8 @@ "famous_for": "nelson mandela and safari", "phone_code": "+27", "flag": "https://flagpedia.net/data/flags/h80/za.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "south sudan (republic of south sudan)", @@ -1627,7 +1789,8 @@ "famous_for": "national parks and oil", "phone_code": "+211", "flag": "https://flagpedia.net/data/flags/h80/ss.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "spain", @@ -1637,7 +1800,8 @@ "famous_for": "salsa and bullfight", "phone_code": "+34", "flag": "https://flagpedia.net/data/flags/h80/es.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "sri lanka", @@ -1647,7 +1811,8 @@ "famous_for": "ceylon tea", "phone_code": "+94", "flag": "https://flagpedia.net/data/flags/h80/lk.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "sudan (republic of the sudan)", @@ -1657,7 +1822,8 @@ "famous_for": "largest collection of pyramids", "phone_code": "+249", "flag": "https://flagpedia.net/data/flags/h80/sd.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "suriname", @@ -1667,7 +1833,8 @@ "famous_for": "water lilies and orchids", "phone_code": "+597", "flag": "https://flagpedia.net/data/flags/h80/sr.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "eswatini (swaziland)", @@ -1677,7 +1844,8 @@ "famous_for": "sibebe rock and largest exposed granite dome", "phone_code": "+268", "flag": "https://flagpedia.net/data/flags/h80/sz.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "sweden", @@ -1687,7 +1855,8 @@ "famous_for": "ikea, meatballs, volvo", "phone_code": "+46", "flag": "https://flagpedia.net/data/flags/h80/se.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "switzerland", @@ -1696,7 +1865,8 @@ "native_language": ["german", "french", "italian"], "famous_for": "alps, natural beauty, chocolates and watches", "flag": "https://flagpedia.net/data/flags/h80/ch.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "syria", @@ -1706,7 +1876,8 @@ "famous_for": "old heritage cities", "phone_code": "+963", "flag": "https://flagpedia.net/data/flags/h80/sy.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "taiwan", @@ -1716,7 +1887,8 @@ "famous_for": "best food", "phone_code": "+886", "flag": "https://flagpedia.net/data/flags/h80/tw.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "tajikistan", @@ -1726,7 +1898,8 @@ "famous_for": "the pamir plateau", "phone_code": "+992", "flag": "https://flagpedia.net/data/flags/h80/tj.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "tanzania", @@ -1736,7 +1909,8 @@ "famous_for": "mining and fishing", "phone_code": "+255", "flag": "https://flagpedia.net/data/flags/h80/tz.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "thailand", @@ -1746,7 +1920,8 @@ "famous_for": "massages, shopping and buddhists", "phone_code": "+66", "flag": "https://flagpedia.net/data/flags/h80/th.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "togo", @@ -1756,7 +1931,8 @@ "famous_for": "history, attraction sites, culture, and commercial activities", "phone_code": "+228", "flag": "https://flagpedia.net/data/flags/h80/tg.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "tonga", @@ -1766,7 +1942,8 @@ "famous_for": "graceful and dignified dancing of the kingdom", "phone_code": "+676", "flag": "https://flagpedia.net/data/flags/h80/to.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "trinidad and tobago", @@ -1776,7 +1953,8 @@ "famous_for": "stable economy, steel pans, carnival festivity, caribbean dance and lush greenary", "phone_code": "+1-868", "flag": "https://flagpedia.net/data/flags/h80/tt.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "tunisia", @@ -1786,7 +1964,8 @@ "famous_for": "gold beaches, sunny weather and affordable luxuries", "phone_code": "+216", "flag": "https://flagpedia.net/data/flags/h80/tn.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "turkey", @@ -1796,7 +1975,8 @@ "famous_for": "big mountain ranges, istanbul, shawarma", "phone_code": "+90", "flag": "https://flagpedia.net/data/flags/h80/tr.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "turkmenistan", @@ -1806,7 +1986,8 @@ "famous_for": "autocratic government and large gas reserves", "phone_code": "+993", "flag": "https://flagpedia.net/data/flags/h80/tm.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "tuvalu", @@ -1816,7 +1997,8 @@ "famous_for": "seafaring skills", "phone_code": "+668", "flag": "https://flagpedia.net/data/flags/h80/tv.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": false }, { "country": "uganda", @@ -1826,7 +2008,8 @@ "famous_for": "cotton, tobacco, tea and home to variety of wildlife", "phone_code": "+256", "flag": "https://flagpedia.net/data/flags/h80/ug.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": true }, { "country": "ukraine", @@ -1836,7 +2019,8 @@ "famous_for": "agricultural production", "phone_code": "+380", "flag": "https://flagpedia.net/data/flags/h80/ua.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "united arab emirates", @@ -1846,7 +2030,8 @@ "famous_for": "dubai, rich seikhs, burj al arab", "phone_code": "+971", "flag": "https://flagpedia.net/data/flags/h80/ae.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "united kingdom", @@ -1856,7 +2041,8 @@ "famous_for": "david beckham, fish and chips, big ben, red buses, black cabs, oasis, blur, the beatles, london and tea", "phone_code": "+44", "flag": "https://flagpedia.net/data/flags/h80/gb.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "united states of america", @@ -1866,7 +2052,8 @@ "famous_for": "grand canyon and mount rushmore", "phone_code": "+1", "flag": "https://flagpedia.net/data/flags/h80/us.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "uruguay", @@ -1876,7 +2063,8 @@ "famous_for": "wine producers", "phone_code": "+589", "flag": "https://flagpedia.net/data/flags/h80/uy.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "uzbekistan", @@ -1886,7 +2074,8 @@ "famous_for": "mosques and mausoleums", "phone_code": "+998", "flag": "https://flagpedia.net/data/flags/h80/uz.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "vanuatu", @@ -1896,7 +2085,8 @@ "famous_for": "vanuatu's underwater world", "phone_code": "+978", "flag": "https://flagpedia.net/data/flags/h80/vu.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "vatican city", @@ -1906,7 +2096,8 @@ "famous_for": "st. peter's basilica, the sistine chapel, and the vatican museums", "phone_code": "+379", "flag": "https://flagpedia.net/data/flags/h80/va.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": true }, { "country": "venezuela", @@ -1916,7 +2107,8 @@ "famous_for": "petroleum industry", "phone_code": "+58", "flag": "https://flagpedia.net/data/flags/h80/ve.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "vietnam", @@ -1926,7 +2118,8 @@ "famous_for": "rice exporter", "phone_code": "+84", "flag": "https://flagpedia.net/data/flags/h80/vn.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "yemen", @@ -1936,7 +2129,8 @@ "famous_for": "home to world's oldest skyscraper city", "phone_code": "+967", "flag": "https://flagpedia.net/data/flags/h80/ye.png", - "drive_direction": "right" + "drive_direction": "right", + "is_landlocked": false }, { "country": "zambia", @@ -1946,7 +2140,8 @@ "famous_for": "iconic victoria falls", "phone_code": "+260", "flag": "https://flagpedia.net/data/flags/h80/zm.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": true }, { "country": "zimbabwe", @@ -1956,6 +2151,7 @@ "famous_for": "hwange and mana pools teem with wildlife", "phone_code": "+263", "flag": "https://flagpedia.net/data/flags/h80/zw.png", - "drive_direction": "left" + "drive_direction": "left", + "is_landlocked": true } ] diff --git a/index.js b/index.js index fcc5c7d..90d7bcd 100644 --- a/index.js +++ b/index.js @@ -125,6 +125,20 @@ const getCountriesByFamousFor = (famousThing) => { ); }; +/** + * Returns an array of objects containing all countries, each containing `country`, `capital`, + * `currency`, `native_language`, `famous_for`, `phone_code`, `flag` and `drive_direction` filtered by `is_landlocked` + * @param {'true' | 'false'} isLandLocked Country is said to be landlocked when it is surrounded on all sides by one or more countries + * @returns {Array} An array of country objects +*/ +const getCountriesByLandLock = (isLandLocked) => { + const isBoolean = typeof isLandLocked === 'boolean' + const filterBy = isBoolean && isLandLocked + return isBoolean && data.filter( + (country) => country.is_landlocked === filterBy + ); +}; + module.exports = { getRandomCountry, getNRandomCountriesData, @@ -135,4 +149,5 @@ module.exports = { getCountriesByLanguage, getCountriesByFamousFor, getCountriesByDriveDirection, + getCountriesByLandLock, }; diff --git a/package-lock.json b/package-lock.json index ce88b46..c2868a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "world-countries-capitals", - "version": "3.1.0", + "version": "3.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/spec/getCountriesSpec.js b/spec/getCountriesSpec.js index 9f6b6e6..e445024 100644 --- a/spec/getCountriesSpec.js +++ b/spec/getCountriesSpec.js @@ -25,6 +25,7 @@ describe("The index", () => { phone_code: "+93", flag: "https://flagpedia.net/data/flags/h80/af.png", drive_direction: "right", + is_landlocked: true }); }); }); @@ -40,6 +41,7 @@ describe("The index", () => { phone_code: "+355", flag: "https://flagpedia.net/data/flags/h80/al.png", drive_direction: "right", + is_landlocked: false }); }); }); @@ -61,6 +63,7 @@ describe("The index", () => { phone_code: "+387", flag: "https://flagpedia.net/data/flags/h80/ba.png", drive_direction: "right", + is_landlocked: false }); }); }); @@ -135,4 +138,46 @@ describe("The index", () => { ).toBeTrue(); }); }); + + describe("The getAllCountriesByLandlock", () => { + it("returns all the landlocked countries", () => { + expect(countryApi.getCountriesByLandLock(true).length).toEqual(45); + }); + + it("returns all the countries which are not landlocked", () => { + expect(countryApi.getCountriesByLandLock(false).length).toEqual(151); + }); + + it("returns countries with isLandLocked set to true", () => { + expect(countryApi.getCountriesByLandLock(true)[0]).toEqual({ + country: "afghanistan", + capital: "kabul", + currency: "afghani", + native_language: ["dari persian", "pashto"], + famous_for: "rugs, taliban", + phone_code: "+93", + flag: "https://flagpedia.net/data/flags/h80/af.png", + drive_direction: "right", + is_landlocked: true + }); + }); + + it("returns countries with isLandLocked set to false", () => { + expect(countryApi.getCountriesByLandLock(false)[0]).toEqual({ + country: "albania", + capital: "tirane", + currency: "lek", + native_language: ["albanian"], + famous_for: "mother teresa", + phone_code: "+355", + flag: "https://flagpedia.net/data/flags/h80/al.png", + drive_direction: "right", + is_landlocked: false + }); + }); + + it("should return undefined if passed any value other than boolean", () => { + expect(countryApi.getCountriesByLandLock(1).length).toEqual(undefined); + }); + }); }); From 40d977b1c5a3518743fbada5a3794b0b5655efe7 Mon Sep 17 00:00:00 2001 From: "Javed Khan (164328)" Date: Mon, 5 Oct 2020 20:22:24 +0530 Subject: [PATCH 2/5] Removed package-lock.json file from PR --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index c2868a5..ce88b46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "world-countries-capitals", - "version": "3.2.1", + "version": "3.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { From b5fb9e357646452678a3429e646489b071493af4 Mon Sep 17 00:00:00 2001 From: "Javed Khan (164328)" Date: Mon, 5 Oct 2020 20:44:54 +0530 Subject: [PATCH 3/5] updated code for review comments --- README.md | 52 ++++++++++++++++++++-------------------- index.js | 8 ++----- spec/getCountriesSpec.js | 25 ++++++++++--------- 3 files changed, 40 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 93f33da..0749d6e 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues "currency": "afghani", "native_language": ["dari persian", "pashto"], "famous_for": "rugs, taliban", - "phone_code": "+93", - "flag": "https://flagpedia.net/data/flags/h80/af.png" + "phone_code": "+93", + "flag": "https://flagpedia.net/data/flags/h80/af.png" }, { "country": "albania", @@ -56,8 +56,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues "currency": "lek", "native_language": ["albanian"], "famous_for" : "mother teresa", - "phone_code": "+355", - "flag": "https://flagpedia.net/data/flags/h80/al.png" + "phone_code": "+355", + "flag": "https://flagpedia.net/data/flags/h80/al.png" }, ... ] @@ -120,8 +120,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: "indian rupee", native_language: ["hindi", "english"], famous_for: "bollywood, yoga, hinduism, food and diversity", - phone_code: "+91", - flag: "https://flagpedia.net/data/flags/h80/in.png" + phone_code: "+91", + flag: "https://flagpedia.net/data/flags/h80/in.png" }, ]; ``` @@ -140,8 +140,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: "indian rupee", native_language: ["hindi", "english"], famous_for: "bollywood, yoga, hinduism, food and diversity", - phone_code: "+91", - flag: "https://flagpedia.net/data/flags/h80/in.png" + phone_code: "+91", + flag: "https://flagpedia.net/data/flags/h80/in.png" }, ]; ``` @@ -178,8 +178,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: "burundi franc", native_language: ["kirundi", "french"], famous_for: "wildlife and greenery", - phone_code: "+257", - flag: "https://flagpedia.net/data/flags/h80/bi.png" + phone_code: "+257", + flag: "https://flagpedia.net/data/flags/h80/bi.png" }, { country: "palau", @@ -187,8 +187,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: "united states dollar", native_language: ["english", "palauan"], famous_for: "jellyfish lake", - phone_code: "+680", - flag: "https://flagpedia.net/data/flags/h80/pw.png" + phone_code: "+680", + flag: "https://flagpedia.net/data/flags/h80/pw.png" }, { country: "dominican republic", @@ -196,8 +196,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: "dominican peso", native_language: ["spanish"], famous_for: "blue ocean water, white-sand beaches and beautiful resorts", - phone_code: "+1-809, +1-829, +1-849", - flag: "https://flagpedia.net/data/flags/h80/do.png" + phone_code: "+1-809, +1-829, +1-849", + flag: "https://flagpedia.net/data/flags/h80/do.png" }, ]; ``` @@ -216,8 +216,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: 'algerian dinar', native_language: ['arabic', 'tamazight', 'french'], famous_for: 'oil and gas reserves', - phone_code: '+213', - flag: "https://flagpedia.net/data/flags/h80/dz.png" + phone_code: '+213', + flag: "https://flagpedia.net/data/flags/h80/dz.png" }, { country: 'angola', @@ -225,8 +225,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: 'kwanza', native_language: ['portuguese'], famous_for: 'oil', - phone_code: '+244', - flag: "https://flagpedia.net/data/flags/h80/ao.png" + phone_code: '+244', + flag: "https://flagpedia.net/data/flags/h80/ao.png" }, { country: 'bahrain', @@ -234,8 +234,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: 'bahraini dinar', native_language: ['arabic'], famous_for: 'oil, pearls and world heritage sites', - phone_code: '+973', - flag: "https://flagpedia.net/data/flags/h80/bh.png" + phone_code: '+973', + flag: "https://flagpedia.net/data/flags/h80/bh.png" }, { country: 'bulgaria', @@ -243,8 +243,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: 'lev', native_language: ['bulgarian'], famous_for: 'lavender oil and the rose valley', - phone_code: '+359', - flag: "https://flagpedia.net/data/flags/h80/bg.png" + phone_code: '+359', + flag: "https://flagpedia.net/data/flags/h80/bg.png" }, { country: 'central african republic', @@ -252,8 +252,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: 'central african cfa franc', native_language: ['sango', 'french'], famous_for: 'diamonds, gold, oil and uranium', - phone_code: '+236', - flag: "https://flagpedia.net/data/flags/h80/cf.png" + phone_code: '+236', + flag: "https://flagpedia.net/data/flags/h80/cf.png" }, { country: 'norway', @@ -261,8 +261,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: 'norwegian krone', native_language: ['norwegian'], famous_for: 'oil, fjords, mountains and midnight sun', - phone_code: '+47', - flag: "https://flagpedia.net/data/flags/h80/no.png" + phone_code: '+47', + flag: "https://flagpedia.net/data/flags/h80/no.png" }, ]; ``` diff --git a/index.js b/index.js index 90d7bcd..c617299 100644 --- a/index.js +++ b/index.js @@ -128,15 +128,11 @@ const getCountriesByFamousFor = (famousThing) => { /** * Returns an array of objects containing all countries, each containing `country`, `capital`, * `currency`, `native_language`, `famous_for`, `phone_code`, `flag` and `drive_direction` filtered by `is_landlocked` - * @param {'true' | 'false'} isLandLocked Country is said to be landlocked when it is surrounded on all sides by one or more countries + * @param {true | false} isLandLocked Country is said to be landlocked when it is surrounded on all sides by one or more countries * @returns {Array} An array of country objects */ const getCountriesByLandLock = (isLandLocked) => { - const isBoolean = typeof isLandLocked === 'boolean' - const filterBy = isBoolean && isLandLocked - return isBoolean && data.filter( - (country) => country.is_landlocked === filterBy - ); + return data.filter( country => country.is_landlocked === isLandLocked); }; module.exports = { diff --git a/spec/getCountriesSpec.js b/spec/getCountriesSpec.js index e445024..a2cb3ba 100644 --- a/spec/getCountriesSpec.js +++ b/spec/getCountriesSpec.js @@ -25,7 +25,7 @@ describe("The index", () => { phone_code: "+93", flag: "https://flagpedia.net/data/flags/h80/af.png", drive_direction: "right", - is_landlocked: true + is_landlocked: true, }); }); }); @@ -41,7 +41,7 @@ describe("The index", () => { phone_code: "+355", flag: "https://flagpedia.net/data/flags/h80/al.png", drive_direction: "right", - is_landlocked: false + is_landlocked: false, }); }); }); @@ -63,7 +63,7 @@ describe("The index", () => { phone_code: "+387", flag: "https://flagpedia.net/data/flags/h80/ba.png", drive_direction: "right", - is_landlocked: false + is_landlocked: false, }); }); }); @@ -140,16 +140,19 @@ describe("The index", () => { }); describe("The getAllCountriesByLandlock", () => { + const landLockedCountries = countryApi.getCountriesByLandLock(true); + const notLandLockedCountries = countryApi.getCountriesByLandLock(false); + it("returns all the landlocked countries", () => { - expect(countryApi.getCountriesByLandLock(true).length).toEqual(45); + expect(landLockedCountries.length).toEqual(45); }); it("returns all the countries which are not landlocked", () => { - expect(countryApi.getCountriesByLandLock(false).length).toEqual(151); + expect(notLandLockedCountries.length).toEqual(151); }); it("returns countries with isLandLocked set to true", () => { - expect(countryApi.getCountriesByLandLock(true)[0]).toEqual({ + expect(landLockedCountries[0]).toEqual({ country: "afghanistan", capital: "kabul", currency: "afghani", @@ -158,12 +161,12 @@ describe("The index", () => { phone_code: "+93", flag: "https://flagpedia.net/data/flags/h80/af.png", drive_direction: "right", - is_landlocked: true + is_landlocked: true, }); }); it("returns countries with isLandLocked set to false", () => { - expect(countryApi.getCountriesByLandLock(false)[0]).toEqual({ + expect(notLandLockedCountries[0]).toEqual({ country: "albania", capital: "tirane", currency: "lek", @@ -172,12 +175,8 @@ describe("The index", () => { phone_code: "+355", flag: "https://flagpedia.net/data/flags/h80/al.png", drive_direction: "right", - is_landlocked: false + is_landlocked: false, }); }); - - it("should return undefined if passed any value other than boolean", () => { - expect(countryApi.getCountriesByLandLock(1).length).toEqual(undefined); - }); }); }); From 44e64ab80c25290daf535909c54b247c8b6942cb Mon Sep 17 00:00:00 2001 From: jav7zaid Date: Mon, 5 Oct 2020 20:57:39 +0530 Subject: [PATCH 4/5] Update Readme.md for indentation issues. --- README.md | 78 +++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 0749d6e..bac2543 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues "currency": "afghani", "native_language": ["dari persian", "pashto"], "famous_for": "rugs, taliban", - "phone_code": "+93", - "flag": "https://flagpedia.net/data/flags/h80/af.png" + "phone_code": "+93", + "flag": "https://flagpedia.net/data/flags/h80/af.png" }, { "country": "albania", @@ -56,8 +56,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues "currency": "lek", "native_language": ["albanian"], "famous_for" : "mother teresa", - "phone_code": "+355", - "flag": "https://flagpedia.net/data/flags/h80/al.png" + "phone_code": "+355", + "flag": "https://flagpedia.net/data/flags/h80/al.png" }, ... ] @@ -120,8 +120,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: "indian rupee", native_language: ["hindi", "english"], famous_for: "bollywood, yoga, hinduism, food and diversity", - phone_code: "+91", - flag: "https://flagpedia.net/data/flags/h80/in.png" + phone_code: "+91", + flag: "https://flagpedia.net/data/flags/h80/in.png" }, ]; ``` @@ -140,8 +140,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: "indian rupee", native_language: ["hindi", "english"], famous_for: "bollywood, yoga, hinduism, food and diversity", - phone_code: "+91", - flag: "https://flagpedia.net/data/flags/h80/in.png" + phone_code: "+91", + flag: "https://flagpedia.net/data/flags/h80/in.png" }, ]; ``` @@ -178,8 +178,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: "burundi franc", native_language: ["kirundi", "french"], famous_for: "wildlife and greenery", - phone_code: "+257", - flag: "https://flagpedia.net/data/flags/h80/bi.png" + phone_code: "+257", + flag: "https://flagpedia.net/data/flags/h80/bi.png" }, { country: "palau", @@ -187,8 +187,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: "united states dollar", native_language: ["english", "palauan"], famous_for: "jellyfish lake", - phone_code: "+680", - flag: "https://flagpedia.net/data/flags/h80/pw.png" + phone_code: "+680", + flag: "https://flagpedia.net/data/flags/h80/pw.png" }, { country: "dominican republic", @@ -196,8 +196,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: "dominican peso", native_language: ["spanish"], famous_for: "blue ocean water, white-sand beaches and beautiful resorts", - phone_code: "+1-809, +1-829, +1-849", - flag: "https://flagpedia.net/data/flags/h80/do.png" + phone_code: "+1-809, +1-829, +1-849", + flag: "https://flagpedia.net/data/flags/h80/do.png" }, ]; ``` @@ -216,8 +216,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: 'algerian dinar', native_language: ['arabic', 'tamazight', 'french'], famous_for: 'oil and gas reserves', - phone_code: '+213', - flag: "https://flagpedia.net/data/flags/h80/dz.png" + phone_code: '+213', + flag: "https://flagpedia.net/data/flags/h80/dz.png" }, { country: 'angola', @@ -225,8 +225,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: 'kwanza', native_language: ['portuguese'], famous_for: 'oil', - phone_code: '+244', - flag: "https://flagpedia.net/data/flags/h80/ao.png" + phone_code: '+244', + flag: "https://flagpedia.net/data/flags/h80/ao.png" }, { country: 'bahrain', @@ -234,8 +234,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: 'bahraini dinar', native_language: ['arabic'], famous_for: 'oil, pearls and world heritage sites', - phone_code: '+973', - flag: "https://flagpedia.net/data/flags/h80/bh.png" + phone_code: '+973', + flag: "https://flagpedia.net/data/flags/h80/bh.png" }, { country: 'bulgaria', @@ -243,8 +243,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: 'lev', native_language: ['bulgarian'], famous_for: 'lavender oil and the rose valley', - phone_code: '+359', - flag: "https://flagpedia.net/data/flags/h80/bg.png" + phone_code: '+359', + flag: "https://flagpedia.net/data/flags/h80/bg.png" }, { country: 'central african republic', @@ -252,8 +252,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: 'central african cfa franc', native_language: ['sango', 'french'], famous_for: 'diamonds, gold, oil and uranium', - phone_code: '+236', - flag: "https://flagpedia.net/data/flags/h80/cf.png" + phone_code: '+236', + flag: "https://flagpedia.net/data/flags/h80/cf.png" }, { country: 'norway', @@ -261,8 +261,8 @@ This section contains nt to _contribute_ to open source? Try solving our issues currency: 'norwegian krone', native_language: ['norwegian'], famous_for: 'oil, fjords, mountains and midnight sun', - phone_code: '+47', - flag: "https://flagpedia.net/data/flags/h80/no.png" + phone_code: '+47', + flag: "https://flagpedia.net/data/flags/h80/no.png" }, ]; ``` @@ -275,25 +275,25 @@ This section contains nt to _contribute_ to open source? Try solving our issues ```javascript [ { - country: 'afghanistan', - capital: 'kabul', - currency: 'afghani', - native_language: ['dari persian', 'pashto'], - famous_for: 'rugs, taliban', - phone_code: '+93', - flag: 'https://flagpedia.net/data/flags/h80/af.png', - drive_direction: 'right', - is_landlocked: true - }, + country: 'afghanistan', + capital: 'kabul', + currency: 'afghani', + native_language: ['dari persian', 'pashto'], + famous_for: 'rugs, taliban', + phone_code: '+93', + flag: 'https://flagpedia.net/data/flags/h80/af.png', + drive_direction: 'right', + is_landlocked: true + }, { country: 'andorra', capital: 'andorra la vella', currency: 'euro', native_language: ['catalan'], famous_for: 'tourism and tobacco', - phone_code: '+244', - flag: 'https://flagpedia.net/data/flags/h80/ad.png', - drive_direction: 'right', + phone_code: '+244', + flag: 'https://flagpedia.net/data/flags/h80/ad.png', + drive_direction: 'right', is_landlocked: true } ]; From b4e6723b4309e4d129d020f21b8ac9e63826c5b0 Mon Sep 17 00:00:00 2001 From: "Javed Khan (164328)" Date: Wed, 7 Oct 2020 10:36:08 +0530 Subject: [PATCH 5/5] updating @param for index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index c617299..85de187 100644 --- a/index.js +++ b/index.js @@ -128,7 +128,7 @@ const getCountriesByFamousFor = (famousThing) => { /** * Returns an array of objects containing all countries, each containing `country`, `capital`, * `currency`, `native_language`, `famous_for`, `phone_code`, `flag` and `drive_direction` filtered by `is_landlocked` - * @param {true | false} isLandLocked Country is said to be landlocked when it is surrounded on all sides by one or more countries + * @param { Boolean } isLandLocked Country that is surrounded by one or more countries * @returns {Array} An array of country objects */ const getCountriesByLandLock = (isLandLocked) => {