(countryName, defaultIfUnknown)
| 193 | const addressesIncludeAdministrativeRegion = country => !!__guard__(_.find(countries, c => c.country === slugify(country)), x1 => x1.addressesIncludeAdministrativeRegion) |
| 194 | |
| 195 | const ageOfConsent = function (countryName, defaultIfUnknown) { |
| 196 | if (defaultIfUnknown == null) { defaultIfUnknown = 0 } |
| 197 | if (!countryName) { return defaultIfUnknown } |
| 198 | const country = _.find(countries, c => c.country === slugify(countryName)) |
| 199 | if (!country) { return defaultIfUnknown } |
| 200 | if (country.ageOfConsent) { return country.ageOfConsent } |
| 201 | if (country.inEU) { return 16 } |
| 202 | return defaultIfUnknown |
| 203 | } |
| 204 | |
| 205 | const countryCodeToFlagEmoji = function (code) { |
| 206 | if ((code != null ? code.length : undefined) !== 2) { return code } |
nothing calls this directly
no outgoing calls
no test coverage detected