{"id":16892150,"url":"https://github.com/zhanba/simplematch","last_synced_at":"2025-04-05T12:28:04.745Z","repository":{"id":42702053,"uuid":"284971383","full_name":"zhanba/simplematch","owner":"zhanba","description":"simple type-safe pattern match  ","archived":false,"fork":false,"pushed_at":"2023-01-06T15:04:44.000Z","size":2012,"stargazers_count":1,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-15T15:03:05.043Z","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/zhanba.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}},"created_at":"2020-08-04T12:23:07.000Z","updated_at":"2023-03-08T16:42:54.000Z","dependencies_parsed_at":"2023-02-06T05:45:27.505Z","dependency_job_id":null,"html_url":"https://github.com/zhanba/simplematch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhanba%2Fsimplematch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhanba%2Fsimplematch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhanba%2Fsimplematch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhanba%2Fsimplematch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhanba","download_url":"https://codeload.github.com/zhanba/simplematch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247336584,"owners_count":20922661,"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":[],"created_at":"2024-10-13T17:10:14.155Z","updated_at":"2025-04-05T12:28:04.726Z","avatar_url":"https://github.com/zhanba.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simplematch\n\nsimple pattern match for typescript\n\n## Install\n\n```\nnpm i simplematch\n```\n\n## example\n\n```typesript\ntype DemoType = 'cat' | 'dog' | 'bird';\n\nconst result = match\u003cDemoType, string\u003e({\n  cat: () =\u003e 'return a string',\n  dog: () =\u003e 'return another string',\n  bird: () =\u003e 'oh',\n});\n\nconst result2 = match\u003cDemoType, boolean\u003e({\n  cat: () =\u003e true,\n  dog: () =\u003e false,\n  bird: () =\u003e true,\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhanba%2Fsimplematch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhanba%2Fsimplematch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhanba%2Fsimplematch/lists"}