{"id":19090748,"url":"https://github.com/kodedninja/choo-shortemit","last_synced_at":"2026-05-24T20:30:16.293Z","repository":{"id":143857877,"uuid":"160962678","full_name":"kodedninja/choo-shortemit","owner":"kodedninja","description":"shortcut access to emit anywhere in your app","archived":false,"fork":false,"pushed_at":"2018-12-08T17:40:21.000Z","size":2,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-02T22:30:25.404Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kodedninja.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-12-08T17:30:49.000Z","updated_at":"2023-06-19T02:42:28.000Z","dependencies_parsed_at":"2023-07-14T13:17:25.600Z","dependency_job_id":null,"html_url":"https://github.com/kodedninja/choo-shortemit","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/kodedninja%2Fchoo-shortemit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodedninja%2Fchoo-shortemit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodedninja%2Fchoo-shortemit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodedninja%2Fchoo-shortemit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kodedninja","download_url":"https://codeload.github.com/kodedninja/choo-shortemit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240138138,"owners_count":19753871,"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-09T03:08:54.588Z","updated_at":"2026-05-24T20:30:16.244Z","avatar_url":"https://github.com/kodedninja.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# choo-shortemit\nshortcut access to `emit()` anywhere in your app\n\ncopy of Jon Gacnik's [choo-shortcache](https://github.com/jongacnik/choo-shortcache)\n\n## Example\n```javascript\napp.use(require('choo-shortemit'))\n```\nAnywhere in your application\n```javascript\nvar html = require('choo/html')\nvar Component = require('nanocomponent')\nvar { emit } = require('choo-shortemit')\n\nmodule.exports = class MyComponent extends Component {\n  createElement() {\n    return html`\n      \u003ca href=\"#\" onclick=\"${onclick}\"\u003eClick me!\u003c/a\u003e\n    `\n\n    function onclick(e) {\n      e.preventDefault()\n      emit('clicked')\n    }\n  }\n}\n\n```\n\n## Why?\nSometimes you want to interact directly with the app so you want to call `emit()`, but it's a struggle (and ugly code) to pass it down to the component. This plugin allows you to emit event anywhere in your app. Under the hood it just creates a reference to `emitter.emit()`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkodedninja%2Fchoo-shortemit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkodedninja%2Fchoo-shortemit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkodedninja%2Fchoo-shortemit/lists"}