jschan - Anonymous imageboard software. Classic look, modern features and feel. Works without JavaScript and supports Tor, I2P, Lokinet, etc.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
609 B

'use strict';
const countries = require('i18n-iso-countries')
, countryNamesMap = countries.getNames('en')
, countryCodes = ['XX', 'T1', 'TOR']
.concat(Object.keys(countryNamesMap));
//this dumb library conveniently includes 2 names for some countries...
Object.entries(countryNamesMap)
.filter(e => Array.isArray(e[1])) //for any country with an array of names,
.forEach(c => countryNamesMap[c[0]] = c[1][0]) //use the first name
countryNamesMap['XX'] = 'Unknown';
countryNamesMap['T1'] = 'Tor Exit Node';
countryNamesMap['TOR'] = 'Tor Onion';
module.exports = {
countryNamesMap,
countryCodes,
}