MCPcopy Create free account
hub / github.com/codecombat/codecombat / countryCodeToName

Function countryCodeToName

app/core/utils.js:210–215  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

208}
209
210const countryCodeToName = function (code) {
211 let country
212 if ((code != null ? code.length : undefined) !== 2) { return code }
213 if (!(country = _.find(countries, { countryCode: code.toUpperCase() }))) { return code }
214 return titleize(country.country)
215}
216
217const countryNameToCode = country => __guard__(_.find(countries, { country: (country != null ? country.toLowerCase() : undefined) }), x1 => x1.countryCode)
218

Callers

nothing calls this directly

Calls 1

titleizeFunction · 0.85

Tested by

no test coverage detected