{"id":16531375,"url":"https://github.com/marcbachmann/muemit","last_synced_at":"2025-04-04T20:42:43.676Z","repository":{"id":36066429,"uuid":"40365566","full_name":"marcbachmann/muemit","owner":"marcbachmann","description":"An EventEmitter implementation for the browser that imitates the nodejs EventEmitter api.","archived":false,"fork":false,"pushed_at":"2023-12-15T08:16:37.000Z","size":51,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T01:54:28.513Z","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/marcbachmann.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":"2015-08-07T14:53:52.000Z","updated_at":"2017-03-13T14:42:13.000Z","dependencies_parsed_at":"2023-12-15T09:38:33.894Z","dependency_job_id":null,"html_url":"https://github.com/marcbachmann/muemit","commit_stats":{"total_commits":22,"total_committers":3,"mean_commits":7.333333333333333,"dds":0.2727272727272727,"last_synced_commit":"ef0d3cb46d46c68817f7f01ad73077e27d7378ef"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbachmann%2Fmuemit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbachmann%2Fmuemit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbachmann%2Fmuemit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcbachmann%2Fmuemit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcbachmann","download_url":"https://codeload.github.com/marcbachmann/muemit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249603,"owners_count":20908211,"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-11T18:08:40.780Z","updated_at":"2025-04-04T20:42:43.656Z","avatar_url":"https://github.com/marcbachmann.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# muemit\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/marcbachmann/muemit.svg)](https://greenkeeper.io/)\n\nAn tiny EventEmitter implementation that imitates the node.js EventEmitter API.\nMeant to run in the browser - at a size of 816bytes (minified \u0026 gzipped).\n\n## API\n\n### Initialization\n```\nvar EventEmitter = require('muemit')\nvar emitter = new EventEmitter()\n```\n\n\n### emitter.addListener(event, listener)\n### emitter.on(event, listener)\nAdds a listener to the end of the listeners array for the specified event. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of event and listener will result in the listener being added multiple times.\n```\nvar something = new EventEmitter()\nsomething.on('data', function (data) {\n  console.log(\"Here's our data object\");\n});\n\ngetSomeData(function(err, data) {\n  if (err) return something.emit('error', err)\n  something.emit('data', data)\n})\n```\n\nThis method emits an `addListener` event.\n\n### emitter.once(event, listener)\nAdds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed.\n\n```\nvar something = new EventEmitter()\nsomething.once('data', function () {\n  console.log(\"Here's our first data object!\");\n});\n\ngetSomeData(function(data, err) {\n  something.emit('data')\n})\n```\n\n\n### emitter.emit(event[, arg1][, arg2][, ...])\nExecute each of the listeners in order with the supplied arguments.\n\nReturns true if event had listeners, false otherwise.\n\n\n### emitter.removeListener(event, listener)\nRemove a listener from the listener array for the specified event. Caution: changes array indices in the listener array behind the listener.\n\nThis method emits an `removeListener` event.\n\n\n### emitter.removeAllListeners([event])\nRemoves all listeners, or those of the specified event.\nIt sends a `removeListener` event for every listener that got removed.\n\nReturns emitter, so calls can be chained.\n\n\n### emitter.listeners(event)\nReturns an array with all listeners of a specific event.\n\n\n### EventEmitter.listenerCount(emitter, event)\nReturn the number of listeners for a given event.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcbachmann%2Fmuemit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcbachmann%2Fmuemit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcbachmann%2Fmuemit/lists"}