{"id":32821267,"url":"https://github.com/tabone/azgaar-fmg-parser","last_synced_at":"2026-06-21T01:02:37.316Z","repository":{"id":247439536,"uuid":"825250120","full_name":"tabone/azgaar-fmg-parser","owner":"tabone","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-10T16:20:38.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-02T03:54:56.745Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tabone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-07-07T08:50:33.000Z","updated_at":"2024-07-10T16:20:42.000Z","dependencies_parsed_at":"2024-07-08T20:54:56.249Z","dependency_job_id":null,"html_url":"https://github.com/tabone/azgaar-fmg-parser","commit_stats":null,"previous_names":["tabone/azgaar-fmg-parser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tabone/azgaar-fmg-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabone%2Fazgaar-fmg-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabone%2Fazgaar-fmg-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabone%2Fazgaar-fmg-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabone%2Fazgaar-fmg-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tabone","download_url":"https://codeload.github.com/tabone/azgaar-fmg-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabone%2Fazgaar-fmg-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283198153,"owners_count":26796040,"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-11-07T02:00:06.343Z","response_time":61,"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-11-07T14:05:43.940Z","updated_at":"2025-11-07T14:07:18.701Z","avatar_url":"https://github.com/tabone.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# azgaar-fmg-parser\n\nAn unofficial utility for parsing Cultures, Provinces, States, Religions, and Burgs from .map files generated by [Azgaar's Fantasy Map Generator](https://azgaar.github.io/Fantasy-Map-Generator/). Ideal for developers working on fantasy world-building tools and games.\n\n## Installation\n\nTo install `azgaar-fmg-parser`, use `yarn`:\n\n```bash\nyarn add azgaar-fmg-parser\n```\n\nOr, if you prefer `npm`:\n\n```bash\nnpm install azgaar-fmg-parser\n```\n\n## Usage\n\nHere's a simple example demonstrating how to use `azgaar-fmg-parser`:\n\n```javascript\nconst fs = require(\"fs\");\nconst { FMG } = require(\"azgaar-fmg-parser\");\n\n// Load a .map file\nconst mapFileContent = fs.readFileSync(\"path/to/your/map/file.map\", \"utf-8\");\n\n// Parse the .map file content\nconst { fmg, info } = FMG.parse({ data: mapFileContent });\n\n// Access parsed data\nconsole.log(\"Burgs:\", fmg.burgs);\nconsole.log(\"States:\", fmg.states);\nconsole.log(\"Cultures:\", fmg.cultures);\nconsole.log(\"Religions:\", fmg.religions);\nconsole.log(\"Provinces:\", fmg.provinces);\n\n// Access parsing information\nconsole.log(\"Parsing Info:\", info);\n```\n\n## TypeScript Usage\n\nYou can use the provided [type predicates](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) to check the types of states, cultures, and religions in a TypeScript project:\n\n```javascript\nimport {\n  isDefaultState,\n  isDefaultCulture,\n  isDefaultReligion,\n  FMG,\n} from \"azgaar-fmg-parser\";\n\n// Assuming `state`, `culture`, and `religion` are variables from your parsed data\nif (isDefaultState(state)) {\n  console.log(\"This is a default state.\");\n}\n\nif (isDefaultCulture(culture)) {\n  console.log(\"This is a default culture.\");\n}\n\nif (isDefaultReligion(religion)) {\n  console.log(\"This is a default religion.\");\n}\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request or open an Issue.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftabone%2Fazgaar-fmg-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftabone%2Fazgaar-fmg-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftabone%2Fazgaar-fmg-parser/lists"}