Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const visit = require('unist-util-visit');
const {resolve} = require('path');
const countries = require('countries-list').countries;
const globby = require('globby');
const langs = require('languages');
const alternateCodes = {
in: 'id',
iw: 'he',
nb: 'no',
};
function replaceValue(array) {
const htmlValue = array.map(
item => `<li>
<svg class="lexicon-icon lexicon-icon-${item.icon}">
</svg>
<span>${item.name}</span></li>
const visit = require('unist-util-visit');
const {resolve} = require('path');
const countries = require('countries-list').countries;
const globby = require('globby');
const langs = require('languages');
const { pathPrefix } = require('../../gatsby-config');
const alternateCodes = {
'in': 'id',
'iw': 'he',
'nb': 'no',
};
function replaceValue(array) {
const htmlValue = array.map(item => `<li>
<svg class="lexicon-icon lexicon-icon-${item.icon}">
</svg>
<span>${item.name}</span></li>
function calculateContinent (alpha2) {
return countriesList.countries && countriesList.countries[alpha2] ? countriesList.countries[alpha2].continent : null;
}
const getCountryList = () => {
const countryArray = [];
Object.keys(countryList.countries).forEach((country) => {
countryArray.push(countryList.countries[country].name);
});
return countryArray;
};
function calculateContinent (alpha2) {
return countriesList.countries[alpha2].continent;
}
Object.keys(countryList.countries).forEach((country) => {
countryArray.push(countryList.countries[country].name);
});
return countryArray;