{"id":16419182,"url":"https://github.com/cameronhunter/event-matchers","last_synced_at":"2026-02-27T20:14:49.526Z","repository":{"id":145461682,"uuid":"52750894","full_name":"cameronhunter/event-matchers","owner":"cameronhunter","description":"Composable functions for handling event callbacks in JS","archived":false,"fork":false,"pushed_at":"2017-04-07T17:43:26.000Z","size":17,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T05:21:34.092Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/cameronhunter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2016-02-28T23:45:36.000Z","updated_at":"2023-10-31T22:26:14.000Z","dependencies_parsed_at":"2023-06-05T05:00:19.767Z","dependency_job_id":null,"html_url":"https://github.com/cameronhunter/event-matchers","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cameronhunter/event-matchers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cameronhunter%2Fevent-matchers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cameronhunter%2Fevent-matchers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cameronhunter%2Fevent-matchers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cameronhunter%2Fevent-matchers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cameronhunter","download_url":"https://codeload.github.com/cameronhunter/event-matchers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cameronhunter%2Fevent-matchers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29911558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"ssl_error","status_checked_at":"2026-02-27T19:37:41.463Z","response_time":57,"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":"2024-10-11T07:16:10.899Z","updated_at":"2026-02-27T20:14:49.492Z","avatar_url":"https://github.com/cameronhunter.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Event Matchers\n\n[![Build Status](https://travis-ci.org/cameronhunter/event-matchers.svg?branch=master)](https://travis-ci.org/cameronhunter/event-matchers) [![NPM Version](https://img.shields.io/npm/v/event-matchers.svg)](https://npmjs.org/package/event-matchers) [![License](https://img.shields.io/npm/l/event-matchers.svg)](https://github.com/cameronhunter/event-matchers/blob/master/LICENSE.md)\n\nComposable functions for handling event callbacks in Vanilla JS. Build complex\nevent handlers by composing simple event matchers. Separate event handling logic\nfrom the behavior logic that the event triggers.\n\n## Example\n\n```javascript\nimport { all, any, delegate, keycode } from 'event-matchers';\n\nconst up = keycode('ArrowUp');\nconst down = keycode('ArrowDown');\nconst left = keycode('ArrowLeft');\nconst right = keycode('ArrowRight');\n\nconst matcher = all(\n  any(up, down, left, right),\n  delegate('.controls')\n);\n\ndocument.addEventListener('keydown', matcher(function(e) {\n  // Only triggered when arrow keys occur on the .controls element\n}));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcameronhunter%2Fevent-matchers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcameronhunter%2Fevent-matchers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcameronhunter%2Fevent-matchers/lists"}