Welcome 👋
The DevIndex grid shows a round flag next to each developer's location, from free text like "Berlin, Germany" or "San Francisco, USA". Neo.util.CountryFlags turns that text into an ISO country code and a flag URL. It has five matching steps, a few surprising edges, and no test yet.
This is a good first issue for Hacktoberfest 2026. It needs Node.js and a clone of this repository: no Docker, no AI setup.
[!IMPORTANT]
Reserved for first-time Neo.mjs contributors. The maintainer team will not claim, edit, or implement this issue through 2026-10-31. Comment here to claim it, and ask anything on this issue.
Set up once: follow Set up the engine from a clone, including npm run bundle-browser-deps: without it the unit suite selects zero tests.
Where things live
- Source:
src/util/CountryFlags.mjs: the static methods getCountryCode(input) and getFlagUrl(nameOrCode), the aliasMap, and 243 countries
- New test file:
test/playwright/unit/util/CountryFlags.spec.mjs
- Pattern to copy:
test/playwright/unit/util/Array.spec.mjs (the setup() call and imports)
- Tip: these are static methods, so there is no instance to create and nothing to mock.
getFlagUrl only builds a URL; nothing is fetched.
What to cover
| Call |
Expected |
getCountryCode('Germany'), ('germany'), (' GERMANY ') |
'de': trimmed, and any case |
getCountryCode('DE') |
'de' |
getCountryCode('USA'), ('UK') |
'us', 'gb': an alias wins before the two-letter rule |
getCountryCode('zz') |
'zz': any two letters count as a code |
getCountryCode('x1') |
'x1' |
getCountryCode('Berlin, Germany') |
'de': a country name inside longer text |
getCountryCode('San Francisco, USA') |
'us': an alias inside longer text |
getCountryCode('Somalia') / ('Mali') |
'so' / 'ml': whole words only |
getCountryCode('Dominican Republic') / ('Dominica') |
'do' / 'dm': the longer name wins |
getCountryCode('Remote'), ('Deutschland'), (''), (null), (42) |
null |
getFlagUrl('Germany') |
'https://hatscripts.github.io/circle-flags/flags/de.svg' |
getFlagUrl('zz') |
'https://hatscripts.github.io/circle-flags/flags/zz.svg', a URL for a code that does not exist |
getFlagUrl('x1') |
null: the URL needs two letters |
getCountryCode('England') / getFlagUrl('England') |
'gb-eng' / null. The alias maps to a region code that the two-letter check refuses. Pin it as it is, and if you think England should get a flag, say so on this issue. |
Done when
Out of scope
The CountryFlag component and the country field that use this class, and completing the country list.
While you wait for review
You just pinned one small piece of a multi-threaded application engine: in Neo.mjs your app's code runs inside a web worker, and the main thread only paints. Two things worth ten minutes:
- See the part nobody expects. Run
npm run build-themes -- -n -e dev -t all and npm run server-start, open apps/workstation/, and drag a tab out of the browser window. It becomes its own OS window, still running, with the same component instances and the same worker. Benefits: Introduction explains why that is possible.
- Your coding agent can go much further here. The skills this repository's AI maintainers work with are published on npm as
neo-agent-skills, and they need no Knowledge Base and no Memory Core. With Claude or GPT beside you, the help wanted issues are within reach after this one.
Maintainer notes
Curated under #18985 (Hacktoberfest 2026). Found work: no unit or component spec names this module on dev (2026-09-24). Every row in the table was run in the unit environment on dev before filing, and the values are the measured ones.
Live latest-open sweep: the latest 20 open issues at 2026-09-24T15:22Z, plus a search for IdGenerator, CountryFlags and rpc Api registerApi; no equivalent. A2A: no claim on this scope. Memory Core: no prior decision.
Origin Session ID: 101d2ce9-9f43-4f5a-9ae2-3c75bf8f6fcf
Welcome 👋
The DevIndex grid shows a round flag next to each developer's location, from free text like "Berlin, Germany" or "San Francisco, USA".
Neo.util.CountryFlagsturns that text into an ISO country code and a flag URL. It has five matching steps, a few surprising edges, and no test yet.This is a good first issue for Hacktoberfest 2026. It needs Node.js and a clone of this repository: no Docker, no AI setup.
Set up once: follow Set up the engine from a clone, including
npm run bundle-browser-deps: without it the unit suite selects zero tests.Where things live
src/util/CountryFlags.mjs: the static methodsgetCountryCode(input)andgetFlagUrl(nameOrCode), thealiasMap, and 243countriestest/playwright/unit/util/CountryFlags.spec.mjstest/playwright/unit/util/Array.spec.mjs(thesetup()call and imports)getFlagUrlonly builds a URL; nothing is fetched.What to cover
getCountryCode('Germany'),('germany'),(' GERMANY ')'de': trimmed, and any casegetCountryCode('DE')'de'getCountryCode('USA'),('UK')'us','gb': an alias wins before the two-letter rulegetCountryCode('zz')'zz': any two letters count as a codegetCountryCode('x1')'x1'getCountryCode('Berlin, Germany')'de': a country name inside longer textgetCountryCode('San Francisco, USA')'us': an alias inside longer textgetCountryCode('Somalia')/('Mali')'so'/'ml': whole words onlygetCountryCode('Dominican Republic')/('Dominica')'do'/'dm': the longer name winsgetCountryCode('Remote'),('Deutschland'),(''),(null),(42)nullgetFlagUrl('Germany')'https://hatscripts.github.io/circle-flags/flags/de.svg'getFlagUrl('zz')'https://hatscripts.github.io/circle-flags/flags/zz.svg', a URL for a code that does not existgetFlagUrl('x1')null: the URL needs two lettersgetCountryCode('England')/getFlagUrl('England')'gb-eng'/null. The alias maps to a region code that the two-letter check refuses. Pin it as it is, and if you think England should get a flag, say so on this issue.Done when
test/playwright/unit/util/CountryFlags.spec.mjsexists, following the pattern file's setup.test(...)per table row.src/.npm run test-unit -- test/playwright/unit/util/CountryFlags.spec.mjspasses.npm run test-unitpasses.Out of scope
The
CountryFlagcomponent and the country field that use this class, and completing the country list.While you wait for review
You just pinned one small piece of a multi-threaded application engine: in Neo.mjs your app's code runs inside a web worker, and the main thread only paints. Two things worth ten minutes:
npm run build-themes -- -n -e dev -t allandnpm run server-start, openapps/workstation/, and drag a tab out of the browser window. It becomes its own OS window, still running, with the same component instances and the same worker. Benefits: Introduction explains why that is possible.neo-agent-skills, and they need no Knowledge Base and no Memory Core. With Claude or GPT beside you, thehelp wantedissues are within reach after this one.Maintainer notes
Curated under #18985 (Hacktoberfest 2026). Found work: no unit or component spec names this module on
dev(2026-09-24). Every row in the table was run in the unit environment ondevbefore filing, and the values are the measured ones. Live latest-open sweep: the latest 20 open issues at 2026-09-24T15:22Z, plus a search forIdGenerator,CountryFlagsandrpc Api registerApi; no equivalent. A2A: no claim on this scope. Memory Core: no prior decision.Origin Session ID: 101d2ce9-9f43-4f5a-9ae2-3c75bf8f6fcf