{"id":16186224,"url":"https://github.com/zenflow/gather-events","last_synced_at":"2025-04-07T13:22:19.898Z","repository":{"id":32219002,"uuid":"35792926","full_name":"zenflow/gather-events","owner":"zenflow","description":"Listen to an EventEmitter for some events and then return an ordered array of events that were emitted.","archived":false,"fork":false,"pushed_at":"2015-06-06T03:05:35.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T06:18:12.445Z","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/zenflow.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}},"created_at":"2015-05-18T02:37:00.000Z","updated_at":"2015-05-18T03:56:21.000Z","dependencies_parsed_at":"2022-08-28T20:52:09.196Z","dependency_job_id":null,"html_url":"https://github.com/zenflow/gather-events","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenflow%2Fgather-events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenflow%2Fgather-events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenflow%2Fgather-events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenflow%2Fgather-events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zenflow","download_url":"https://codeload.github.com/zenflow/gather-events/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657249,"owners_count":20974350,"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-10T07:17:37.208Z","updated_at":"2025-04-07T13:22:19.860Z","avatar_url":"https://github.com/zenflow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gather-events\nListen to an EventEmitter for some events and then return an ordered array of events that were emitted.\n\n[![build status](https://travis-ci.org/zenflow/gather-events.svg?branch=master)](https://travis-ci.org/zenflow/gather-events?branch=master)\n[![dependencies](https://david-dm.org/zenflow/gather-events.svg)](https://david-dm.org/zenflow/gather-events)\n[![dev-dependencies](https://david-dm.org/zenflow/gather-events/dev-status.svg)](https://david-dm.org/zenflow/gather-events#info=devDependencies)\n\n[![npm](https://nodei.co/npm/gather-events.svg?downloads=true\u0026downloadRank=true\u0026stars=true)](https://www.npmjs.com/package/gather-events)\n\n\n### example usage\n\n```js\nvar EventEmitter = require('events').EventEmitter;\nvar gatherEvents = require('./lib');\n\nvar event_emitter = new EventEmitter;\nvar endGather = gatherEvents(event_emitter, ['foo', 'bar']);\n\nevent_emitter.emit('foo', {a: 1}, 2);\nevent_emitter.emit('bar', 3);\n\nvar gathered = endGather();\nconsole.log(JSON.stringify(gathered));\n// -\u003e [{\"name\":\"foo\",\"args\":[{\"a\":1},2]},{\"name\":\"bar\",\"args\":[3]}]\n\n// --- or /w shorthand option---\nvar gathered = endGather(true);\nconsole.log(JSON.stringify(gathered));\n// -\u003e [{\"foo\":[{\"a\":1},2],{\"bar\": [3]}]\n```\n\n### changelog\n\n#### v1.1.0\n- added shorthand option\n- enhanced tests\n\n#### v1.0.2\n- enhanced readme\n- enhanced package.json","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenflow%2Fgather-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzenflow%2Fgather-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenflow%2Fgather-events/lists"}