{"id":16863798,"url":"https://github.com/nazar-pc/async-eventer","last_synced_at":"2025-03-18T16:39:23.171Z","repository":{"id":57185589,"uuid":"103938757","full_name":"nazar-pc/async-eventer","owner":"nazar-pc","description":"A tiny library with asynchronous Promise-based implementation of events dispatching and handling","archived":false,"fork":false,"pushed_at":"2018-06-16T00:45:23.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T15:18:06.187Z","etag":null,"topics":["async","asynchronous","dispatch","event","handle","promise"],"latest_commit_sha":null,"homepage":null,"language":"LiveScript","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/nazar-pc.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":"2017-09-18T12:53:41.000Z","updated_at":"2018-06-16T00:45:25.000Z","dependencies_parsed_at":"2022-09-06T04:11:19.737Z","dependency_job_id":null,"html_url":"https://github.com/nazar-pc/async-eventer","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazar-pc%2Fasync-eventer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazar-pc%2Fasync-eventer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazar-pc%2Fasync-eventer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazar-pc%2Fasync-eventer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nazar-pc","download_url":"https://codeload.github.com/nazar-pc/async-eventer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244261483,"owners_count":20424946,"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":["async","asynchronous","dispatch","event","handle","promise"],"created_at":"2024-10-13T14:39:47.071Z","updated_at":"2025-03-18T16:39:23.143Z","avatar_url":"https://github.com/nazar-pc.png","language":"LiveScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Async eventer [![Travis CI](https://img.shields.io/travis/nazar-pc/async-eventer/master.svg?label=Travis%20CI)](https://travis-ci.org/nazar-pc/async-eventer)\nA tiny library with asynchronous Promise-based implementation of events dispatching and handling.\n\nThis library works in Node and in Browser environments (UMD) and is optimized for very small size (under 1000 bytes raw, under 500 bytes gz).\n\n## How to install\n```\nnpm install async-eventer\n```\n\n## How to use\nNode.js:\n```javascript\nvar Eventer = require('async-eventer')\n\nvar instance = Eventer();\n// Do stuff\n```\nBrowser:\n```javascript\nrequirejs(['async-eventer'], function (Eventer) {\n    var instance = Eventer();\n    // Do stuff\n})\n```\n\n## API\n\n### Eventer.on(event: string, callback: Function) : Eventer\nRegister event handler.\n\n### Eventer.once(event: string, callback: Function) : Eventer\nRegister one-time event handler (just `on()` + `off()` under the hood).\n\n### Eventer.off(event: string[, callback: Function]) : Eventer\nUnregister event handler.\n\n### Eventer.fire(event: string, ...param) : Promise\nDispatch an event with arbitrary number of parameters.\n\n`tests/index.ls` contains usage examples.\n\n## Contribution\nFeel free to create issues and send pull requests (for big changes create an issue first and link it from the PR), they are highly appreciated!\n\nWhen reading LiveScript code make sure to configure 1 tab to be 4 spaces (GitHub uses 8 by default), otherwise code might be hard to read.\n\n## License\nFree Public License 1.0.0 / Zero Clause BSD License\n\nhttps://opensource.org/licenses/FPL-1.0.0\n\nhttps://tldrlegal.com/license/bsd-0-clause-license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnazar-pc%2Fasync-eventer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnazar-pc%2Fasync-eventer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnazar-pc%2Fasync-eventer/lists"}