{"id":42667833,"url":"https://github.com/oboard/mimetype","last_synced_at":"2026-01-29T10:13:09.782Z","repository":{"id":251410153,"uuid":"837329149","full_name":"oboard/mimetype","owner":"oboard","description":"Mime types for MoonBit","archived":false,"fork":false,"pushed_at":"2025-10-18T12:38:17.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T07:46:01.996Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"MoonBit","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oboard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-02T18:01:17.000Z","updated_at":"2025-10-18T12:38:20.000Z","dependencies_parsed_at":"2024-08-12T18:58:37.585Z","dependency_job_id":"dac3ddbe-4437-4232-9d0b-7e91e330a6e4","html_url":"https://github.com/oboard/mimetype","commit_stats":null,"previous_names":["oboard/mimetype"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oboard/mimetype","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oboard%2Fmimetype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oboard%2Fmimetype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oboard%2Fmimetype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oboard%2Fmimetype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oboard","download_url":"https://codeload.github.com/oboard/mimetype/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oboard%2Fmimetype/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28875450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T09:47:23.353Z","status":"ssl_error","status_checked_at":"2026-01-29T09:47:19.357Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-29T10:13:09.036Z","updated_at":"2026-01-29T10:13:09.771Z","avatar_url":"https://github.com/oboard.png","language":"MoonBit","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oboard/mimetype\n\nAn API for MIME type information.\n\n- All `mime-db` types\n\n## Installation\n\n```bash\nmoon add oboard/mimetype\n```\n\n## Quick Start\n\nFor the full version (800+ MIME types, 1,000+ extensions):\n\n```moonbit\nlet mime = @mimetype.new()\nmime.get_type(\"txt\")                    // ⇨ \"text/plain\"\nmime.get_extension(\"text/plain\")        // ⇨ Some(\"txt\")\n```\n\n## API\n\n### `mime.get_type(path_or_extension)`\n\nGet mime type for the given file path or extension. E.g.\n\n```moonbit\nmime.get_type(\"js\") // ⇨ \"text/javascript\"\nmime.get_type(\"json\") // ⇨ \"application/json\"\n\nmime.get_type(\"txt\") // ⇨ \"text/plain\"\nmime.get_type(\"dir/text.txt\") // ⇨ \"text/plain\"\nmime.get_type(\"dir\\\\text.txt\") // ⇨ \"text/plain\"\nmime.get_type(\".text.txt\") // ⇨ \"text/plain\"\nmime.get_type(\".txt\") // ⇨ \"text/plain\"\n```\n\n`None` is returned in cases where an extension is not detected or recognized\n\n```moonbit\nmime.get_type(\"foo/txt\") // ⇨ None\nmime.get_type(\"bogus_type\") // ⇨ None\n```\n\n### `mime.get_extension(type)`\n\nGet file extension for the given mime type. Charset options (often included in Content-Type headers) are ignored.\n\n```moonbit\nmime.get_extension(\"text/plain\") // ⇨ Some(\"txt\")\nmime.get_extension(\"application/json\") // ⇨ Some(\"json\")\nmime.get_extension(\"text/html; charset=utf8\") // ⇨ Some(\"html\")\n```\n\n### `mime.get_all_extensions(type)`\n\nGet all file extensions for the given mime type.\n\n```moonbit\nmime.get_all_extensions(\"image/jpeg\") // ⇨ [\"jpeg\", \"jpg\", \"jpe\"]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foboard%2Fmimetype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foboard%2Fmimetype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foboard%2Fmimetype/lists"}