{"id":30112424,"url":"https://github.com/future-station/geodex","last_synced_at":"2026-01-20T16:58:23.410Z","repository":{"id":307960891,"uuid":"1031197571","full_name":"future-station/geodex","owner":"future-station","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-03T08:39:05.000Z","size":149,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-03T10:16:00.288Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/future-station.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-03T08:16:35.000Z","updated_at":"2025-08-03T08:39:08.000Z","dependencies_parsed_at":"2025-08-03T10:35:14.299Z","dependency_job_id":null,"html_url":"https://github.com/future-station/geodex","commit_stats":null,"previous_names":["future-station/geodex"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/future-station/geodex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-station%2Fgeodex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-station%2Fgeodex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-station%2Fgeodex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-station%2Fgeodex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/future-station","download_url":"https://codeload.github.com/future-station/geodex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-station%2Fgeodex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269684165,"owners_count":24458862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-10T06:17:22.625Z","updated_at":"2026-01-20T16:58:23.404Z","avatar_url":"https://github.com/future-station.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Geodex\r\n\r\nA modern, zero-dependency, and tree-shakeable JavaScript library for comprehensive country, currency, and language data.\r\n\r\n[](https://www.google.com/search?q=https://www.npmjs.com/package/geodex)\r\n[](https://opensource.org/licenses/MIT)\r\n[](https://www.google.com/search?q=https://github.com/future-station/geodex/actions)\r\n\r\n-----\r\n\r\n## Features\r\n\r\n- **Comprehensive Data**: Access standardized information for countries, currencies, and languages.\r\n- **Zero-Dependency**: Lightweight and won't add extra bloat to your project.\r\n- **Fully Tree-Shakeable**: Import only the data you need, keeping your bundle size to a minimum.\r\n- **TypeScript Native**: Written entirely in TypeScript, providing full type support out of the box.\r\n- **Universal Compatibility**: Works in Node.js, Deno, and modern browsers via ESM, CommonJS, and UMD bundles.\r\n- **Built-in Lookup**: Includes simple utility functions to easily find the data you need.\r\n\r\n-----\r\n\r\n## Installation\r\n\r\n```bash\r\n# Using npm\r\nnpm install geodex\r\n\r\n# Using yarn\r\nyarn add geodex\r\n\r\n# Using pnpm\r\npnpm add geodex\r\n```\r\n\r\n-----\r\n\r\n## Usage\r\n\r\n### ES Modules (Recommended)\r\n\r\nThis is the recommended approach for modern applications, as it allows for tree-shaking.\r\n\r\n```javascript\r\nimport { countries, currencies, lookup } from 'geodex';\r\n\r\n// Get a specific country by its alpha-2 code\r\nconst usa = countries['US'];\r\nconsole.log(usa.name); // 'United States'\r\nconsole.log(usa.currencies); // ['USD']\r\n\r\n// Get currency details\r\nconst euro = currencies['EUR'];\r\nconsole.log(euro.name); // 'Euro'\r\nconsole.log(euro.symbol); // '€'\r\n\r\n// Use the lookup function to find countries\r\nconst eurozone = lookup.countries({ currency: 'EUR' });\r\nconsole.log(eurozone.length); // e.g., 25\r\n```\r\n\r\n### Tree-Shaking for Smaller Bundles\r\n\r\nFor maximum optimization, you can import data modules directly. This is ideal for frontend projects where bundle size is critical.\r\n\r\n```javascript\r\n// Import only the countries data\r\nimport { countries } from 'geodex/data/countries';\r\n\r\n// Import only the currencies data\r\nimport { currencies } from 'geodex/data/currencies';\r\n```\r\n\r\n### Browser Usage (via CDN)\r\n\r\nYou can use `geodex` directly in the browser via a CDN. The library will be available on the `window.geodex` object.\r\n\r\n```html\r\n\u003c!DOCTYPE html\u003e\r\n\u003chtml\u003e\r\n\u003chead\u003e\r\n    \u003ctitle\u003eGeodex Demo\u003c/title\u003e\r\n    \u003cscript src=\"https://cdn.jsdelivr.net/npm/geodex/dist/geodex.min.js\"\u003e\u003c/script\u003e\r\n\u003c/head\u003e\r\n\u003cbody\u003e\r\n    \u003cscript\u003e\r\n        const symbol = window.geodex.currencies['USD'].symbol;\r\n        console.log(symbol); // '$'\r\n\r\n        const canada = window.geodex.countries['CA'];\r\n        console.log(canada.name); // 'Canada'\r\n    \u003c/script\u003e\r\n\u003c/body\u003e\r\n\u003c/html\u003e\r\n```\r\n\r\n### CommonJS (Legacy Node.js)\r\n\r\nFor older Node.js projects using `require`.\r\n\r\n```javascript\r\nconst { countries, currencies } = require('geodex');\r\n\r\nconsole.log(countries['JP'].name); // 'Japan'\r\nconsole.log(currencies['JPY'].symbol); // '¥'\r\n```\r\n\r\n-----\r\n\r\n## API Reference\r\n\r\n### `countries`\r\n\r\nAn object containing all countries, keyed by their `alpha2` and `alpha3` codes.\r\n\r\n- `name`: The English name for the country (e.g., `'Germany'`).\r\n- `alpha2`: The ISO 3166-1 alpha-2 code (e.g., `'DE'`).\r\n- `alpha3`: The ISO 3166-1 alpha-3 code (e.g., `'DEU'`).\r\n- `currencies`: An array of ISO 4217 currency codes (e.g., `['EUR']`).\r\n- `languages`: An array of ISO 639-2 language codes.\r\n- `countryCallingCodes`: An array of international call prefixes (e.g., `['+49']`).\r\n- `ioc`: The IOC country code (e.g., `'GER'`).\r\n- `emoji`: The country's flag emoji (e.g., '🇩🇪').\r\n- `status`: The ISO 3166-1 assignment status (`'assigned'`, `'reserved'`, etc.).\r\n\r\n### `currencies`\r\n\r\nAn object containing all currencies, keyed by their ISO 4217 code.\r\n\r\n- `name`: The currency name (e.g., `'British Pound'`).\r\n- `code`: The ISO 4217 code (e.g., `'GBP'`).\r\n- `number`: The ISO 4217 number (e.g., `'826'`).\r\n- `decimals`: The number of decimal digits used.\r\n- `symbol`: The currency symbol (e.g., `'£'`).\r\n\r\n### `languages`\r\n\r\nAn object containing all languages, keyed by their `alpha3` code.\r\n\r\n- `name`: The English name of the language.\r\n- `alpha2`: The ISO 639-1 code (2-letter).\r\n- `alpha3`: The ISO 639-2 code (3-letter).\r\n- `bibliographic`: The ISO 639-2 bibliographic code.\r\n\r\n### `lookup`\r\n\r\nA utility object with functions to find data.\r\n\r\n- `lookup.countries({ key: value })`: Returns an array of countries matching the query.\r\n- `lookup.currencies({ key: value })`: Returns an array of currencies matching the query.\r\n- `lookup.languages({ key: value })`: Returns an array of languages matching the query.\r\n\r\n\u003c!-- end list --\u003e\r\n\r\n```javascript\r\nimport { lookup } from 'geodex';\r\n\r\n// Find all countries that use the US Dollar\r\nconst usdCountries = lookup.countries({ currency: 'USD' });\r\n```\r\n\r\n-----\r\n\r\n## Contributing\r\n\r\nContributions are welcome\\! Please follow these steps to contribute:\r\n\r\n1. **Fork** the repository on GitHub.\r\n2. **Clone** your fork locally:\r\n\r\n    ```bash\r\n    git clone https://github.com/YOUR_USERNAME/geodex.git\r\n    ```\r\n\r\n3. **Install** dependencies:\r\n\r\n    ```bash\r\n    cd geodex\r\n    npm install\r\n    ```\r\n\r\n4. Create a new **branch** for your feature or fix.\r\n5. Make your changes in the **`src`** directory.\r\n6. **Test** your changes:\r\n\r\n    ```bash\r\n    npm test\r\n    ```\r\n\r\n7. **Commit** and **push** your changes to your fork.\r\n8. Open a **Pull Request** on the main `geodex` repository.\r\n\r\n-----\r\n\r\n## License\r\n\r\nThis project is licensed under the **MIT License**. See the [LICENSE](https://www.google.com/search?q=LICENSE) file for details.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-station%2Fgeodex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuture-station%2Fgeodex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-station%2Fgeodex/lists"}