{"id":19309779,"url":"https://github.com/mitica/text-country","last_synced_at":"2025-07-21T03:31:53.851Z","repository":{"id":71343600,"uuid":"134263800","full_name":"mitica/text-country","owner":"mitica","description":"Finds country in text","archived":false,"fork":false,"pushed_at":"2018-11-30T19:22:38.000Z","size":584,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T17:23:11.754Z","etag":null,"topics":["country","country-code","extractor","text","text-country"],"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/mitica.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":"2018-05-21T12:06:21.000Z","updated_at":"2022-12-19T07:30:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"9036801f-6eae-4314-9e7f-debfd04d5d0b","html_url":"https://github.com/mitica/text-country","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mitica/text-country","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitica%2Ftext-country","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitica%2Ftext-country/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitica%2Ftext-country/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitica%2Ftext-country/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitica","download_url":"https://codeload.github.com/mitica/text-country/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitica%2Ftext-country/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266235363,"owners_count":23897176,"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","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":["country","country-code","extractor","text","text-country"],"created_at":"2024-11-10T00:20:43.471Z","updated_at":"2025-07-21T03:31:53.818Z","avatar_url":"https://github.com/mitica.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# text-country\n\nFinds country in text.\n\n## Usage\n\n``` ts\n\nimport textCountry from 'text-country';\nconst lang = 'en';\nconst text = 'Ministry of Foreign Affairs of Moldova'; // Moldova =\u003e md\nconst results = textCountry(text, lang);\n// [{ \"country\": \"md\", \"rating\": 1 }]\n\n```\n\n## API\n\n### (text: string, lang: string, options?: Options): CountryRating[]\n\nReturns a list of founded countries ordered by rating.\n\n#### TS Types\n\n```ts\ntype Options = {\n    // returns first found country\n    firstFound?: boolean\n}\ntype CountryRating = {\n    country: string\n    rating: number\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitica%2Ftext-country","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitica%2Ftext-country","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitica%2Ftext-country/lists"}