jellanarta/daftar-wilayah-indonesia ? reverse-engineered prompt
Reverse engineered prompt
Build me a TypeScript library that lets me easily get Indonesian administrative regions, from provinces down to districts and villages.
I want simple functions to list all provinces, get kabupaten or kota by province code, get kecamatan by kabupaten code, and get desa or kelurahan by kecamatan code. It should also support looking up a single region by code, searching by name across levels, and returning the full hierarchy for one code so I can show breadcrumbs from desa up to provinsi.
Make it fast, lightweight, and easy to use in both Node.js and frontend apps, with both import and require support. Please keep the data accurate for the current Indonesian regions, make code formats flexible with or without dots, and include clean TypeScript types. If you need to check any current docs or regional codes online, go ahead and do that.
Are you gonna build this?
make sure you review the code using coderabbit