{"title":"Event Emitter Grouped","name":"event-emitter-grouped","version":"2.7.1","description":"Emit events in serial or parallel with support for synchronous and asynchronous listeners","homepage":"https://github.com/bevry/event-emitter-grouped","license":"MIT","keywords":["event","events","emitter","eventemitter","async","sync","parallel","serial","flow","completion","callback"],"badges":{"list":["travisci","npmversion","npmdownloads","daviddm","daviddmdev","---","patreon","opencollective","flattr","paypal","bitcoin","wishlist"],"config":{"patreonUsername":"bevry","opencollectiveUsername":"bevry","flattrUsername":"balupton","paypalURL":"https://bevry.me/paypal","bitcoinURL":"https://bevry.me/bitcoin","wishlistURL":"https://bevry.me/wishlist"}},"author":{"name":"2013+ Bevry Pty Ltd","email":"us@bevry.me","url":"http://bevry.me"},"maintainers":[{"email":"b@lupton.cc","name":"balupton"},{"email":"us@bevry.me","name":"bevryme"}],"contributors":[{"name":"Benjamin Lupton","email":"b@lupton.cc","url":"http://balupton.com"},{"name":"Sean Fridman","email":"mail@seanfridman.com","url":"http://seanfridman.com"}],"bugs":{"url":"https://github.com/bevry/event-emitter-grouped/issues"},"repository":{"type":"git","url":"git+https://github.com/bevry/event-emitter-grouped.git"},"engines":{"node":">=0.8"},"editions":[{"description":"esnext source code with require for modules","directory":"source","entry":"index.js","syntaxes":["javascript","esnext","require"],"engines":{"node":">=6","browsers":false}},{"description":"esnext compiled for browsers with require for modules","directory":"edition-browsers","entry":"index.js","syntaxes":["javascript","require"],"engines":{"node":false,"browsers":"defaults"}},{"description":"esnext compiled for node.js >=0.8 with require for modules","directory":"edition-node-0.8","entry":"index.js","syntaxes":["javascript","require"],"engines":{"node":"0.8 || 0.10 || 0.12 || 4 || 6 || 8 || 10","browsers":false}}],"main":"index.js","browser":"edition-browsers/index.js","dependencies":{"editions":"^2.0.2","taskgroup":"^5.0.0","unbounded":"^1.1.0"},"devDependencies":{"assert-helpers":"^4.5.1","babel-cli":"^6.26.0","babel-preset-env":"^1.7.0","babel-preset-es2015":"^6.24.1","documentation":"^8.1.2","eslint":"^5.5.0","eslint-plugin-babel":"^5.1.0","joe":"^2.0.2","joe-reporter-console":"^2.0.2","projectz":"^1.4.0","surge":"^0.20.1"},"scripts":{"our:clean":"rm -Rf ./docs ./edition:* ./es2015 ./es5 ./out","our:compile":"npm run our:compile:edition-browsers && npm run our:compile:edition-node-0.8","our:compile:edition-browsers":"env BABEL_ENV=edition-browsers babel --out-dir ./edition-browsers ./source","our:compile:edition-node-0.8":"env BABEL_ENV=edition-node-0.8 babel --out-dir ./edition-node-0.8 ./source","our:deploy":"echo no need for this project","our:meta":"npm run our:meta:docs && npm run our:meta:projectz","our:meta:docs":"documentation build -f html -o ./docs -g --shallow ./source/**.js","our:meta:projectz":"projectz compile","our:release":"npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push","our:release:check-changelog":"cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)","our:release:check-dirty":"git diff --exit-code","our:release:prepare":"npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta","our:release:push":"git push origin master && git push origin --tags","our:release:tag":"export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"","our:setup":"npm run our:setup:npm","our:setup:npm":"npm install","our:test":"npm run our:verify && npm test","our:verify":"npm run our:verify:eslint","our:verify:eslint":"eslint --fix ./source","test":"node --harmony ./test.js --joe-reporter=console"},"babel":{"env":{"edition-browsers":{"presets":[["env",{"targets":{"browsers":"defaults"}}]]},"edition-node-0.8":{"presets":[["env",{"targets":{"node":"0.8"}}]]}}},"gitHead":"f02f6e7b5e2ad4ad96c78b562fbd70482511fb20","_id":"event-emitter-grouped@2.7.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.4","_npmUser":{"name":"bevryme","email":"us@bevry.me"},"dist":{"integrity":"sha512-SKeWdzwPRyUTkc6ixmnTwLXqYX4LdpKSNliqm95NxUxzwsT+Bu+eEmgalRajPY5SHcbOG/9UHHao8+p5BI3uQA==","shasum":"17af4efd6ce7dc4e0f0573375ffdbeda47693c7d","tarball":"http://registry-npm.ywwl.com/event-emitter-grouped/download/event-emitter-grouped-2.7.1.tgz","fileCount":8,"unpackedSize":34667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjSLOCRA9TVsSAnZWagAAQ5IP/ROrUyO6eI7lKQxD54wN\ntjTBjT+IPnx3tGX06ESQBw8hLnJxxs5hpaCuJjjVY8AwdxktIHcV/DB1CRf1\nROm8FQHqSIkIENEEFvW/uVGLtb7na4oiTwQHVvgucYeR5OK04VLz0dCSRNU1\nEp8VAoKEz8I6fpsSYru4sqx6j9UFKDb1criAYI/lq4baRdZcbeHQTuq17T61\nbf+W1KcdsN+BLsZ7WeXPoavHDekU+1IaZfXodi8xAv2U0ggO2xtOM8MlQSSI\n6mHMKLz0ZfJDm9fI+WBDppRaNcZdnJU9JobHshCjaZtd46dim73yMgl3zEGw\ndso/krXD9h3b6NaIdSRlzanJ80YNNztS5hhlWA81EkW7iEdEzdKAP/XvbDW0\n+MTRAaaCMdqDf2LgiC01zh6YYpHXm5NkWAu0MFDWPR6Vqem4wvy5dsPTtr9t\nHRVh84twpZDnqUbRQGi5GrL2mGf/tY2peHjD+YVUJHOU6kOVroXxc8Zmf4Bh\nGGdtd4+sy5WgcG0UuTx579WKp6hVY2u1HeWrAfQPG+XYRetyLiJAmxkyDExR\nZHIdLDjompaeIY7GMYTx56Sjee18ZIgovCyH3KmIcvQ0WsVjUJJaBK7proi5\nrTfc0javBS/OpT5JhyKXzRzWKU3uUrY9K8y6YMyymlj/1b3pG4vx4dTPMIks\ncRIj\r\n=bRuB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCt8knT/qRtEm3Fu76DPwVMDf4GTG8KYC7o9WK7yFGfkwIhANaxuxUtmW3Vcom2StHlHONnM+80yWlD8xsMygYJ17fE"}],"size":7732,"noattachment":false,"key":"/event-emitter-grouped/-/event-emitter-grouped-2.7.1.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/event-emitter-grouped_2.7.1_1535976141318_0.6082693484197894"},"_hasShrinkwrap":false,"readme":"<!-- TITLE/ -->\n\n# Event Emitter Grouped\n\n<!-- /TITLE -->\n\n<!-- BADGES/ -->\n\n<span class=\"badge-githubworkflow\"><a href=\"https://github.com/bevry/event-emitter-grouped/actions?query=workflow%3Abevry\" title=\"View the status of this project's GitHub Workflow: bevry\"><img src=\"https://github.com/bevry/event-emitter-grouped/workflows/bevry/badge.svg\" alt=\"Status of the GitHub Workflow: bevry\" /></a></span>\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/event-emitter-grouped\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/event-emitter-grouped.svg\" alt=\"NPM version\" /></a></span>\n<span class=\"badge-npmdownloads\"><a href=\"https://npmjs.org/package/event-emitter-grouped\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/dm/event-emitter-grouped.svg\" alt=\"NPM downloads\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n<br class=\"badge-separator\" />\n<span class=\"badge-discord\"><a href=\"https://discord.gg/nQuXddV7VP\" title=\"Join this project's community on Discord\"><img src=\"https://img.shields.io/discord/1147436445783560193?logo=discord&amp;label=discord\" alt=\"Discord server badge\" /></a></span>\n<span class=\"badge-twitch\"><a href=\"https://www.twitch.tv/balupton\" title=\"Join this project's community on Twitch\"><img src=\"https://img.shields.io/twitch/status/balupton?logo=twitch\" alt=\"Twitch community badge\" /></a></span>\n\n<!-- /BADGES -->\n\n<!-- DESCRIPTION/ -->\n\nEmit events in serial or parallel with support for synchronous and asynchronous listeners\n\n<!-- /DESCRIPTION -->\n\n\n## Usage\n\n[Complete API Documentation.](http://master.event-emitter-grouped.bevry.surge.sh/docs/)\n\n```javascript\n// Importer\nvar EventEmitterGrouped = require('event-emitter-grouped')\n\n// Instantiate a new instance\nvar emitter = new EventEmitterGrouped()\n\n// Bind an asynchronous event\nemitter.on('hello', function (next) {\n    console.log('\\tasync started')\n    setTimeout(function () {\n        console.log('\\tasync finished')\n        next()\n    }, 1000)\n})\n\n// Bind a synchronous event\nemitter.on('hello', function () {\n    console.log('\\tsync started and finished')\n})\n\n// Bind a prioritized event\nfunction vipListener() {\n    console.log('\\tvip started and finished')\n}\nvipListener.priority = 1\nemitter.on('hello', vipListener)\n\n// Emit the events in serial (one after the other in a waiting fashion)\nconsole.log('hello in serial started')\nemitter.emitSerial('hello', function (err) {\n    console.log('hello in serial finished')\n\n    // Emit the events in parallel (all at once)\n    console.log('hello in parallel started')\n    emitter.emitParallel('hello', function (err) {\n        console.log('hello in parallel finished')\n    })\n})\n\n/* Outputs:\nhello in serial started\n\tvip started and finished\n\tasync started\n\tasync finished\n\tsync started and finished\nhello in serial finished\nhello in parallel started\n\tvip started and finished\n\tasync started\n\tsync started and finished\n\tasync finished\nhello in parallel finished\n*/\n```\n\n<!-- INSTALL/ -->\n\n## Install\n\n### [npm](https://npmjs.com \"npm is a package manager for javascript\")\n\n-   Install: `npm install --save event-emitter-grouped`\n-   Import: `import * as pkg from ('event-emitter-grouped')`\n-   Require: `const pkg = require('event-emitter-grouped')`\n\n### [jspm](https://jspm.io \"Native ES Modules CDN\")\n\n``` html\n<script type=\"module\">\n    import * as pkg from '//dev.jspm.io/event-emitter-grouped@6.7.0'\n</script>\n```\n### [Editions](https://editions.bevry.me \"Editions are the best way to produce and consume packages you care about.\")\n\nThis package is published with the following editions:\n-   `event-emitter-grouped` aliases `event-emitter-grouped/index.cjs` which uses the [Editions Autoloader](https://github.com/bevry/editions \"You can use the Editions Autoloader to autoload the appropriate edition for your consumers environment\") to automatically select the correct edition for the consumer's environment\n-   `event-emitter-grouped/source/index.js` is [ESNext](https://en.wikipedia.org/wiki/ECMAScript#ES.Next \"ECMAScript Next\") source code for [Node.js](https://nodejs.org \"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\") 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with [Require](https://nodejs.org/dist/latest-v5.x/docs/api/modules.html \"Node/CJS Modules\") for modules\n-   `event-emitter-grouped/edition-browsers/index.js` is [ESNext](https://en.wikipedia.org/wiki/ECMAScript#ES.Next \"ECMAScript Next\") compiled for web browsers with [Require](https://nodejs.org/dist/latest-v5.x/docs/api/modules.html \"Node/CJS Modules\") for modules\n-   `event-emitter-grouped/edition-node-4/index.js` is [ESNext](https://en.wikipedia.org/wiki/ECMAScript#ES.Next \"ECMAScript Next\") compiled for [Node.js](https://nodejs.org \"Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine\") 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with [Require](https://nodejs.org/dist/latest-v5.x/docs/api/modules.html \"Node/CJS Modules\") for modules\n\n### [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\")\n\nThis project provides its type information via inline [JSDoc Comments](http://usejsdoc.org \"JSDoc is an API documentation generator for JavaScript, similar to Javadoc or phpDocumentor\"). To make use of this in [TypeScript](https://www.typescriptlang.org/ \"TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.\"), set your <code>maxNodeModuleJsDepth</code> compiler option to `5` or thereabouts. You can accomplish this via your `tsconfig.json` file like so:\n``` json\n{\n  \"compilerOptions\": {\n    \"maxNodeModuleJsDepth\": 5\n  }\n}\n```\n\n<!-- /INSTALL -->\n\n<!-- HISTORY/ -->\n\n## History\n\n[Discover the release history by heading on over to the `HISTORY.md` file.](https://github.com/bevry/event-emitter-grouped/blob/HEAD/HISTORY.md#files)\n\n<!-- /HISTORY -->\n\n<!-- BACKERS/ -->\n\n## Backers\n\n### Code\n\n[Discover how to contribute via the `CONTRIBUTING.md` file.](https://github.com/bevry/event-emitter-grouped/blob/HEAD/CONTRIBUTING.md#files)\n\n#### Authors\n\n-   [Benjamin Lupton](https://balupton.com) — Accelerating collaborative wisdom.\n\n#### Maintainers\n\n-   [Benjamin Lupton](https://balupton.com) — Accelerating collaborative wisdom.\n\n#### Contributors\n\n-   [Benjamin Lupton](https://github.com/balupton) — [view contributions](https://github.com/bevry/event-emitter-grouped/commits?author=balupton \"View the GitHub contributions of Benjamin Lupton on repository bevry/event-emitter-grouped\")\n-   [Sean Fridman](https://github.com/sfrdmn) — [view contributions](https://github.com/bevry/event-emitter-grouped/commits?author=sfrdmn \"View the GitHub contributions of Sean Fridman on repository bevry/event-emitter-grouped\")\n\n### Finances\n\n<span class=\"badge-githubsponsors\"><a href=\"https://github.com/sponsors/balupton\" title=\"Donate to this project using GitHub Sponsors\"><img src=\"https://img.shields.io/badge/github-donate-yellow.svg\" alt=\"GitHub Sponsors donate button\" /></a></span>\n<span class=\"badge-thanksdev\"><a href=\"https://thanks.dev/u/gh/bevry\" title=\"Donate to this project using ThanksDev\"><img src=\"https://img.shields.io/badge/thanksdev-donate-yellow.svg\" alt=\"ThanksDev donate button\" /></a></span>\n<span class=\"badge-patreon\"><a href=\"https://patreon.com/bevry\" title=\"Donate to this project using Patreon\"><img src=\"https://img.shields.io/badge/patreon-donate-yellow.svg\" alt=\"Patreon donate button\" /></a></span>\n<span class=\"badge-liberapay\"><a href=\"https://liberapay.com/bevry\" title=\"Donate to this project using Liberapay\"><img src=\"https://img.shields.io/badge/liberapay-donate-yellow.svg\" alt=\"Liberapay donate button\" /></a></span>\n<span class=\"badge-buymeacoffee\"><a href=\"https://buymeacoffee.com/balupton\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n<span class=\"badge-opencollective\"><a href=\"https://opencollective.com/bevry\" title=\"Donate to this project using Open Collective\"><img src=\"https://img.shields.io/badge/open%20collective-donate-yellow.svg\" alt=\"Open Collective donate button\" /></a></span>\n<span class=\"badge-crypto\"><a href=\"https://bevry.me/crypto\" title=\"Donate to this project using Cryptocurrency\"><img src=\"https://img.shields.io/badge/crypto-donate-yellow.svg\" alt=\"crypto donate button\" /></a></span>\n<span class=\"badge-paypal\"><a href=\"https://bevry.me/paypal\" title=\"Donate to this project using Paypal\"><img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"PayPal donate button\" /></a></span>\n\n#### Sponsors\n\n-   [Andrew Nesbitt](https://nesbitt.io) — Software engineer and researcher\n-   [Balsa](https://balsa.com) — We're Balsa, and we're building tools for builders.\n-   [Codecov](https://codecov.io) — Empower developers with tools to improve code quality and testing.\n-   [Poonacha Medappa](https://poonachamedappa.com)\n-   [Rob Morris](https://github.com/Rob-Morris)\n-   [Sentry](https://sentry.io) — Real-time crash reporting for your web apps, mobile apps, and games.\n-   [Syntax](https://syntax.fm) — Syntax Podcast\n\n#### Donors\n\n-   [Andrew Nesbitt](https://nesbitt.io)\n-   [Armen Mkrtchian](https://mogoni.dev)\n-   [Balsa](https://balsa.com)\n-   [Chad](https://opencollective.com/chad8)\n-   [Codecov](https://codecov.io)\n-   [dr.dimitru](https://veliovgroup.com)\n-   [Elliott Ditman](https://elliottditman.com)\n-   [entroniq](https://gitlab.com/entroniq)\n-   [GitHub](https://github.com/about)\n-   [Hunter Beast](https://cryptoquick.com)\n-   [Jean-Luc Geering](https://github.com/jlgeering)\n-   [Michael Duane Mooring](https://mdm.cc)\n-   [Michael Harry Scepaniak](https://michaelscepaniak.com)\n-   [Mohammed Shah](https://github.com/smashah)\n-   [Mr. Henry](https://mrhenry.be)\n-   [Nermal](https://arjunaditya.vercel.app)\n-   [Pleo](https://pleo.io)\n-   [Poonacha Medappa](https://poonachamedappa.com)\n-   [Rob Morris](https://github.com/Rob-Morris)\n-   [Robert de Forest](https://github.com/rdeforest)\n-   [Sentry](https://sentry.io)\n-   [ServieJS](https://github.com/serviejs)\n-   [Skunk Team](https://skunk.team)\n-   [Syntax](https://syntax.fm)\n-   [WriterJohnBuck](https://github.com/WriterJohnBuck)\n\n<!-- /BACKERS -->\n\n<!-- LICENSE/ -->\n\n## License\n\nUnless stated otherwise all works are:\n\n-   Copyright &copy; [Benjamin Lupton](https://balupton.com)\n\nand licensed under:\n\n-   [Artistic License 2.0](http://spdx.org/licenses/Artistic-2.0.html)\n\n<!-- /LICENSE -->\n","publish_time":1535976141497,"_cnpm_publish_time":1535976141497,"dist-tags":{"latest":"6.7.0","next":"6.7.0-next.1704168079.ef70921735d43e8194a9cd1bf5077c4cad486415"}}