{"id":21630534,"url":"https://github.com/belsrc/match","last_synced_at":"2026-05-21T07:38:48.394Z","repository":{"id":147695780,"uuid":"209198796","full_name":"belsrc/match","owner":"belsrc","description":"Match Function","archived":false,"fork":false,"pushed_at":"2019-09-22T22:13:34.000Z","size":294,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T23:32:40.784Z","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/belsrc.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}},"created_at":"2019-09-18T02:23:52.000Z","updated_at":"2019-09-22T22:12:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"9d6ca27a-ff07-40f7-ac34-08cf1abf2ce3","html_url":"https://github.com/belsrc/match","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belsrc%2Fmatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belsrc%2Fmatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belsrc%2Fmatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belsrc%2Fmatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/belsrc","download_url":"https://codeload.github.com/belsrc/match/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244307830,"owners_count":20432096,"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-11-25T02:11:21.299Z","updated_at":"2026-05-21T07:38:43.354Z","avatar_url":"https://github.com/belsrc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JS Match\nSimple little JS match function.\n\n# Install\n\n```\nnpm i -s @belsrc/match\n```\n\n# Use\n\n```js\nconst arr = [ 1, 2 ];\nconst hello = () =\u003e 'world';\n\nconst matchRnd = Match.create([\n  [ 'foo', 'bar' ],\n  [ hello, 'its a func' ],\n  [ arr, 'its an array' ],\n  [ '_', 'default val' ],\n]);\n\nconsole.log(matchRnd(hello));\n// \u003e\u003e its a func\n\nconsole.log(matchRnd(arr));\n// \u003e\u003e its an array\n\nconsole.log(matchRnd(() =\u003e 'world'));\n// \u003e\u003e default val\n\n```\n\n## LICENCE\n\n[MIT](LICENCE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelsrc%2Fmatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelsrc%2Fmatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelsrc%2Fmatch/lists"}