{"_id":"@alcumus/aggregating-event-emitter","_rev":"24-c4eddf33f986d02fb8935eb2a53a3eb4","name":"@alcumus/aggregating-event-emitter","dist-tags":{"latest":"0.1.1","HF-487-1":"0.1.1-HF-487-1"},"versions":{"0.0.1":{"name":"@alcumus/aggregating-event-emitter","version":"0.0.1","description":"An event emitter that provides both normal event emitting functionality as well as the ability to aggregate results of calling the event handlers. For example you can use emitAsync to receive an array of the results of all the event handlers that were tri","main":"src/index.js","publishConfig":{"access":"public"},"scripts":{"build-docs":"jsdoc src/event-emitter.js README.md --destination docs","test":"mocha 'test/**/*.test.js'","lint":"eslint 'src/**/*.js' 'test/**/*.js'","watch":"nodemon --ext ts,html,scss,js,json --exec \"npm run lint || exit 1\"","fix":"eslint \"src/**/*.js\" \"test/**/*.js\" \"*.js\" --fix && stylelint \"src/**/*.scss\" \"*.scss\" --fix"},"keywords":["event","eventemitter","event-emitter","aggregation"],"author":{"name":"Alcumus Group"},"license":"ISC","devDependencies":{"@alcumus/common-tools":"0.0.16","benchmark":"^2.1.4","chai":"^4.2.0","eslint":"^5.15.1","jsdoc":"^3.5.5","mocha":"^6.0.2","nyc":"^13.3.0","sinon":"^7.2.7"},"dependencies":{"lodash":"^4.17.11"},"repository":{"type":"git","url":"git+https://github.com/Alcumus/aggregating-event-emitter.git"},"gitHead":"886b00c232323227fad4397fd0117b214e20b6a4","bugs":{"url":"https://github.com/Alcumus/aggregating-event-emitter/issues"},"homepage":"https://github.com/Alcumus/aggregating-event-emitter#readme","_id":"@alcumus/aggregating-event-emitter@0.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"lwelsh","email":"lauren.mae.welsh@gmail.com"},"dist":{"integrity":"sha512-R4ecr9BNYWdBMeg5Y+nK4uzIKPj/CRxYUv7kJ6hzpZhu06n8BHZQuzfH2tDEblsdu7mULimcdzMe3UsVThqEYA==","shasum":"65e8476c48b87195ed8353e106b85b0cb157c864","tarball":"https://registry.npmjs.org/@alcumus/aggregating-event-emitter/-/aggregating-event-emitter-0.0.1.tgz","fileCount":38,"unpackedSize":1094282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrL4+CRA9TVsSAnZWagAA9WEQAIXoW1QUNsSrCXpc2GfC\ndLp0s3y50lBkW3b9bRvuwjw+oD+VSyX/JbMR+M8MMX49w+T2du0GkU2n1E5f\nEnY6FAVwZtsVhuPuuAXIUzSoWQhNu2Ti13MpMTYFBetaQ1qIL1Ar4f4a0R1t\nNMVC+L/6NS24bYogIs6GII03OPho9PalEs8FFnNkYWG9h1xn7oSweyQXUXDw\nB9+ukjgcZ3bklE40RNkYmdJdUiJgmJ5HPywqkg0md/h7uoevnyj7Dg96e92M\nYYe2JjFe0O0Nsd0B+9hSoPUh/Piv6GH/T6pWYDq9P38K1qab9B02aScy7jIs\nBXuqOXDrF052tgXg8hJBkWF9C6Wv/YEv6U7Jd04kHtrIPVrAEeeIvfZxZtWF\nPc1bqF3MIEot/I4hmR4VPzh0vYRfFZWhz620Zuq15d2enzQBijbc2K8+WcpC\nySVlQZ4wwd7fOnDMd87zVtcVESQrBUIesnk9ybj2JPybNk8sSHx8Szi+Oj0P\nYursD1CIgpWbRC9y8jnEJXNI+XXFq/LfyVGw9RCyR3fXqAfg0ge8enUhB/W6\nxYer6mbsIC9pdgiGy2KjZJOiAKyyMe4rmTcQC8490DtEBLyOhsYlUNGbCDkE\nII8AoGJlq89V5Sb093xhB+/z67W5BgFkfGa4dguaS8fqPblcEQFhbuob1xf2\nvikL\r\n=wWzk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICbbQZMNK/LqmbGkC177QhglDcgGJiLjHQhA4OOo1hElAiBFUWavjpmzhKmqQqzC+998c4vmtHM9SyFs+5qYw+RPTg=="}]},"maintainers":[{"name":"lwelsh","email":"lauren.mae.welsh@gmail.com"},{"name":"sfuenffinger","email":"simon.fuenffinger@alcumusgroup.com"},{"name":"itinfrastructure_alcumusgroup","email":"itinfrastructure@alcumusgroup.com"},{"name":"whydoidoit","email":"michael.john.talbot@gmail.com"},{"name":"thor84no","email":"thor84no@gmail.com"},{"name":"davecozens","email":"dave@davecozens.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aggregating-event-emitter_0.0.1_1554824765257_0.4548593035732469"},"_hasShrinkwrap":false},"0.0.2":{"name":"@alcumus/aggregating-event-emitter","version":"0.0.2","description":"An event emitter that provides both normal event emitting functionality as well as the ability to aggregate results of calling the event handlers. For example you can use emitAsync to receive an array of the results of all the event handlers that were tri","main":"src/index.js","scripts":{"build-docs":"jsdoc src/event-emitter.js README.md --destination docs","test":"mocha --forbid-only 'test/**/*.test.js'","lint":"eslint 'src/**/*.js' 'test/**/*.js'","watch":"nodemon --ext ts,html,scss,js,json --exec \"npm run lint || exit 1\"","fix":"eslint \"src/**/*.js\" \"test/**/*.js\" \"*.js\" --fix && stylelint \"src/**/*.scss\" \"*.scss\" --fix"},"keywords":["event","eventemitter","event-emitter","aggregation"],"author":{"name":"Alcumus Group"},"license":"ISC","devDependencies":{"al-common-tools":"0.0.14","benchmark":"^2.1.4","chai":"^4.2.0","eslint":"^5.15.1","jsdoc":"^3.5.5","mocha":"^6.0.2","nyc":"^13.3.0","sinon":"^7.2.7"},"dependencies":{"lodash":"^4.17.11"},"repository":{"type":"git","url":"git+https://github.com/Alcumus/aggregating-event-emitter.git"},"gitHead":"2612d595fd4ee0833a2a574a3709dc14312a7250","bugs":{"url":"https://github.com/Alcumus/aggregating-event-emitter/issues"},"homepage":"https://github.com/Alcumus/aggregating-event-emitter#readme","_id":"@alcumus/aggregating-event-emitter@0.0.2","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"lwelsh","email":"lauren.mae.welsh@gmail.com"},"dist":{"integrity":"sha512-09mnku30v23SXraXVj7uxhgA1SEaapUn0ZJoepAqBt6sxG+oLi1Xh/y6+Wf+jG3pSPnHcck+YcgA0qKnXy4n2A==","shasum":"7b44305abae916f3f27caba370a57d443b2e4a3f","tarball":"https://registry.npmjs.org/@alcumus/aggregating-event-emitter/-/aggregating-event-emitter-0.0.2.tgz","fileCount":38,"unpackedSize":1114032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrfhFCRA9TVsSAnZWagAAdG4P/24tr19g1IVTN/dtmot2\n3R5CpqzXenqtb2itOqGc5E+KwTggXvgSO/mDpJHS3LiIMEze5lIkBSpKr843\npS0huOPx6UUdivAkwa1CVzOpkAV6dTFS//EmbvY+gmyiSCiJMvmAXmGlhQtZ\n6UOYdbg2MELF3wo/aB/QkeuNpMRECA856tKX6VwrwgbW9Q8ens+yA/uJ9CZy\nnTD7xP8/ZGqTCZmt7SyrVCJN9d743NYjMDne6AzR3AQHsyHQLul5KElUgPKP\noS/Xfx/9e2Fl29jl7bFo0go/sB6gUp4pics1TbdUKBGLx23VBsfCQewBvWtV\nXNdkzo8krqi94SISsokgjXsMkqoqNfSRfwVwOGyLUQ2JCR8qg6v0kxxGuIxt\nQXyz7zRpecLKIVbmiCOdHLgo2Girp/MDQbIYzzDMcWQL2QmJJtpdG8gYJ055\nPlpiZ5+quMl/rGXDKVih/Me/w2w6uUG+ONHM+8L+3MStu2dWobk5RARUNNw0\ngSnDul9kdiSyfFbkgdyXgMLry7mw/bRPwJAweyWKGJc6SmBt/X5YawVPL/T5\nP6Jeam5kokm9yJ4uWxKNycH915jiZ7Je0UwBBIzhVMicWM9U5vUOtoZkXEj4\nyS9gS69rBMHJF4dDWExzcEu3mNpd/0S2DZ3r+MbO2hz4VL/9wNe/rjCfRop8\nTSUS\r\n=MV5Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3lolyR531MWiJW6lkQWm9ukcKK762KAXABG4rGUSlOQIhANAe7hHkQDLM/Ekfsj5ZN6/cB7P5xyu8gijGcvBFHG9Z"}]},"maintainers":[{"name":"davecozens","email":"dave@davecozens.com"},{"name":"itinfrastructure_alcumusgroup","email":"itinfrastructure@alcumusgroup.com"},{"name":"lwelsh","email":"lauren.mae.welsh@gmail.com"},{"name":"sfuenffinger","email":"simon.fuenffinger@alcumusgroup.com"},{"name":"thor84no","email":"thor84no@gmail.com"},{"name":"whydoidoit","email":"michael.john.talbot@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aggregating-event-emitter_0.0.2_1554905156987_0.8657783729545963"},"_hasShrinkwrap":false},"0.1.0":{"name":"@alcumus/aggregating-event-emitter","version":"0.1.0","description":"An event emitter that provides both normal event emitting functionality as well as the ability to aggregate results of calling the event handlers. For example you can use emitAsync to receive an array of the results of all the event handlers that were tri","main":"src/index.js","publishConfig":{"access":"public"},"scripts":{"build-docs":"jsdoc src/event-emitter.js README.md --destination docs","test":"mocha --forbid-only 'test/**/*.test.js'","lint":"eslint 'src/**/*.js' 'test/**/*.js'","watch":"nodemon --ext ts,html,scss,js,json --exec \"npm run lint || exit 1\"","fix":"eslint \"src/**/*.js\" \"test/**/*.js\" \"*.js\" --fix && stylelint \"src/**/*.scss\" \"*.scss\" --fix"},"keywords":["event","eventemitter","event-emitter","aggregation"],"author":{"name":"Alcumus Group"},"license":"ISC","devDependencies":{"@alcumus/common-tools":"0.0.19","benchmark":"^2.1.4","chai":"^4.2.0","eslint":"^5.15.1","jsdoc":"^3.6.2","mocha":"^6.1.4","nyc":"^14.0.0","sinon":"^7.2.7"},"dependencies":{"lodash":"^4.17.11"},"repository":{"type":"git","url":"git+https://github.com/Alcumus/aggregating-event-emitter.git"},"gitHead":"f5f47da9f8bf8e1a7e100cb92cebcddabd7c6a70","bugs":{"url":"https://github.com/Alcumus/aggregating-event-emitter/issues"},"homepage":"https://github.com/Alcumus/aggregating-event-emitter#readme","_id":"@alcumus/aggregating-event-emitter@0.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"thor84no","email":"thor84no@gmail.com"},"dist":{"integrity":"sha512-OzhQ1Ild7JWbSpnhB2glennDF8BOr8ztFvVaEl3EqSGymT7BxaRVH3Q+sB30dB5I39AH1KG6kS62DnKYUrT2zw==","shasum":"15062113e4e1e44f06995f36e38332c5b44fdacb","tarball":"https://registry.npmjs.org/@alcumus/aggregating-event-emitter/-/aggregating-event-emitter-0.1.0.tgz","fileCount":39,"unpackedSize":1488421,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc48pYCRA9TVsSAnZWagAARaUP/RgM7c92tTUovwNvSFjT\nnNSh7YsMiBT7NBwTGqNQ42Eo0MuwnkPEiG1k4knsFQgtx/fgdHOSKBGpixFe\nQx+1i5DOFxtyejBATXoa69mRF6PTvvPvdcxJNWqIp/6N9gK5/sNaCXzRAsc3\nThbd2QxqGL9T6QeCVVMMNAv3rOfw+IenkNuU/uagJqhGk11v/OrlmbaA/KZq\nTAMO8PS2QEiwZ97tjJQUSVnmBFjdfnNLPXDJEb9G1rWO0DrPlX4AXvhAGBdp\nWwQD2vMLXtwYOCs4OUrl7nisuCofL8jwLS84oZyyJ7kkRgnITBUH6YDh3xEq\njyhElwrhYFY1FFmgiA4yfKAdPMA0pZv/Yzo5G0SrFaGTU7LFZdHqr0gC69jX\nJtfxUPctJhJ0WPBE7UUSMHZsdulOxlIkglzL7P/R1pgbuzcTXcdbdxaLDKxg\nyxMhbgTRYU++2ucDolyS5ryZuhCaHWwPaXBn7YBrBbHAwLk/1864W8MZJIi5\nx8oMHMfBmbVvXtl45Vf4Xtb4vJZQ6Ebs/s70YFVg3QLe8uRXiFKKiIlt8T+l\n+v9SNh1sD9Tc0llnR7xnu7CGyWcot5GeOuB2EVU2h5EwSGi+Te4fDAimLYr5\nC089XU7gRdeEUIXb5fz65IzwoCgS/kWktnWIDoPWQ8NxRvW4n0OFDs4OhXs5\n1nKM\r\n=IEwF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+mHbR2W/WBeShEiGJUuFGyCx4dPls+yXFrSSLz8/z1wIgBfrMg4e/ygBJjmuc1MnrRRoZQfuXKt7Y2IHNrqoMk+Y="}]},"maintainers":[{"email":"dave@davecozens.com","name":"davecozens"},{"email":"itinfrastructure@alcumusgroup.com","name":"itinfrastructure_alcumusgroup"},{"email":"lauren.mae.welsh@gmail.com","name":"lwelsh"},{"email":"nia.evans@alcumusgroup.com","name":"nevans"},{"email":"simon.fuenffinger@alcumusgroup.com","name":"sfuenffinger"},{"email":"thor84no@gmail.com","name":"thor84no"},{"email":"michael.john.talbot@gmail.com","name":"whydoidoit"},{"email":"nabeelamir2@gmail.com","name":"woozay"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aggregating-event-emitter_0.1.0_1558432343742_0.7364523072943661"},"_hasShrinkwrap":true},"0.1.1-HF-487-1":{"name":"@alcumus/aggregating-event-emitter","version":"0.1.1-HF-487-1","description":"An event emitter that provides both normal event emitting functionality as well as the ability to aggregate results of calling the event handlers. For example you can use emitAsync to receive an array of the results of all the event handlers that were tri","main":"src/index.js","publishConfig":{"access":"public"},"scripts":{"build-docs":"jsdoc src/event-emitter.js README.md --destination docs","test":"mocha --forbid-only 'test/**/*.test.js'","lint":"eslint 'src/**/*.js' 'test/**/*.js'","watch":"nodemon --ext ts,html,scss,js,json --exec \"npm run lint || exit 1\"","fix":"eslint \"src/**/*.js\" \"test/**/*.js\" \"*.js\" --fix && stylelint \"src/**/*.scss\" \"*.scss\" --fix"},"keywords":["event","eventemitter","event-emitter","aggregation"],"author":{"name":"Alcumus Group"},"license":"ISC","devDependencies":{"@alcumus/common-tools":"^0.1.2","benchmark":"^2.1.4","chai":"^4.2.0","eslint":"^5.15.1","jsdoc":"^3.6.2","mocha":"^6.1.4","nyc":"^14.0.0","sinon":"^7.2.7"},"dependencies":{"lodash":"^4.17.11"},"repository":{"type":"git","url":"git+https://github.com/Alcumus/aggregating-event-emitter.git"},"readme":"# Aggregating Event Emitter\n\nThis is an event emitter that works similar to standard event emitters, but is purpose built to use events for getting\ndata as well as simply notifying parts of the system of events. This is helpful for invertion-of-control approaches\nwhere you don't necessarily know what will be able to provide your code with the data you need, only that it will\nexist at runtime.\n\nIn addition to this it has useful features like wildcard matching and list item matching.\n\n### Installation\n\n```sh\nnpm i @alcumus/aggregating-event-emitter\n```\n\n### Usage examples\n\nGetting data returned by event handlers:\n\n```js\n// Handler.js\nconst dataEvents = require('aggregating-event-emitter').aggregatingEventEmitter({ name: 'data', wildcards: true });\nconst data = {\n    namespace: [1, 4, 9, 12]\n};\ndataEvents.on('*.data.get', (event, query) => {\n    if (query.$gt) {\n        const name = event.eventName.split('.')[0];\n        return (data[name] || []).filter(value => value > query.$gt);\n    }\n});\n\n// Emitter.js\n// We can reference the previously instantiated event emitter by name and don't need to provide other options to it.\nconst dataEvents = require('aggregating-event-emitter').aggregatingEventEmitter({ name: 'data' });\nconst data = dataEvents.emit('namespace.data.get', { $gt: 5 });\nconsole.log(data); // [[9, 12]]\n```\n\nWaterfall:\n\n```js\nconst events = require('aggregating-event-emitter').aggregatingEventEmitter();\n\n// These event handlers will be fired in this order and the output of the first will be passed to the input of the second.\nevents.on('my-event', (event, array) => array.map(value => value + 10));\nevents.on('my-event', (event, array) => array.map(value => value * 2));\n\nconst data = events.emitWaterfall('my-event', [0, 5, 10]);\nconsole.log(data); // [20, 30, 40]\n```\n\nBe aware that it's fully possible for one handler to break the data structure for another handler if you are not careful when\nusing the waterfall functions. In order to mitigate this, it may be worth using hooks to ensure the order is appropriate.\n\n# API\n\nThe API docs are available here: https://alcumus.github.io/aggregating-event-emitter/\n","readmeFilename":"README.md","gitHead":"cceb0bf9b4e458faea3f49124e86b8c3edc65cfb","bugs":{"url":"https://github.com/Alcumus/aggregating-event-emitter/issues"},"homepage":"https://github.com/Alcumus/aggregating-event-emitter#readme","_id":"@alcumus/aggregating-event-emitter@0.1.1-HF-487-1","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"thor84no","email":"thor84no@gmail.com"},"dist":{"integrity":"sha512-OQiYgIWWAKoPgP6xtwf4aOjDbR0BOHs15ZL3oK9GT+u9vkQsenbE/V4X+/IvHzXvUrSuuD+jlKjWJyZz3Dl8Cw==","shasum":"7fbbb4c64f33b96528822bc6b279c601a221d5f4","tarball":"https://registry.npmjs.org/@alcumus/aggregating-event-emitter/-/aggregating-event-emitter-0.1.1-HF-487-1.tgz","fileCount":39,"unpackedSize":1482850,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7QZNCRA9TVsSAnZWagAAVkgP/AuobNvQoPjX/WChWW/V\ncDbE0VOFbUrYsl+CuirbE9CmG24BA92ksHiSFtm2ClzGRDsc60ML8t5iXt7l\nVhX0FoXb+pjdIg/F6qcVZHcAwaOopWQC/4Q8Ge8nyo8NJO2JWXrgU1r3zwl5\nrEJLxEt33wmFq44L0t4OYJUldPmxDNnBiE1nI5lgiHqca5LJaxErbI2YTJMV\nrAh7XA2gx1z3GuXbJp8yk0Lk6N7E6brEwzMkt+n1xQ1Xp0xx3bAQ3IZEz5hA\nJ7lqwj+pu1OEP5PJRzAqLszCsOQ6zImCZ6JTs8sUkZZDK4KXYww2vMCHAw42\nQEDasncJJhV8QoNzCG1ytNvLdxeVge0uxMd97bK5EWfFZ2tH00wYvj2Fw0Kk\n5V46uNoEYk8g56i1VsF0lmud8YXU8jK0RlnPY/KxAEaOPAf1b5JR2OXc1TJP\ntqyhTGhKrkZSUQZxSUdAmRpjFajDJulB5wG2HFZZzOneCHKkpb9q8xvfdnNz\nXmy3T73/XQH0VggaOjBR3SL1oBFljdDhO81FVg/6zi4USZD1leyojr9RBiwS\nDDD4GP4KGI9HYOSxQ+7ZoK42sR4OR0nq8fQAu4Sw+ffjXiy9gdyI/SitY21e\nOjKRYwdvc7m8dvZTok2TPOiu0By6/3LsFagzXxiUSw3w8Ilf3ciRB2GdeWy+\n8veh\r\n=uDtb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEp6wH3l61gRddRQGOGzfd/V0UegsbBHerj6UicaOLQwAiAHVQDbxGAmIf/5zC5TptdFnuYWW5FHjohgkNzwp4cT3g=="}]},"maintainers":[{"email":"dave@davecozens.com","name":"davecozens"},{"email":"itinfrastructure@alcumusgroup.com","name":"itinfrastructure_alcumusgroup"},{"email":"lauren.mae.welsh@gmail.com","name":"lwelsh"},{"email":"nia.evans@alcumusgroup.com","name":"nevans"},{"email":"simon.fuenffinger@alcumusgroup.com","name":"sfuenffinger"},{"email":"thor84no@gmail.com","name":"thor84no"},{"email":"michael.john.talbot@gmail.com","name":"whydoidoit"},{"email":"nabeelamir2@gmail.com","name":"woozay"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aggregating-event-emitter_0.1.1-HF-487-1_1559037516196_0.9162401410395911"},"_hasShrinkwrap":true},"0.1.1":{"name":"@alcumus/aggregating-event-emitter","version":"0.1.1","description":"An event emitter that provides both normal event emitting functionality as well as the ability to aggregate results of calling the event handlers. For example you can use emitAsync to receive an array of the results of all the event handlers that were tri","main":"src/index.js","publishConfig":{"access":"public"},"scripts":{"build-docs":"jsdoc src/event-emitter.js README.md --destination docs","test":"mocha --forbid-only 'test/**/*.test.js'","lint":"eslint 'src/**/*.js' 'test/**/*.js'","watch":"nodemon --ext ts,html,scss,js,json --exec \"npm run lint || exit 1\"","fix":"eslint \"src/**/*.js\" \"test/**/*.js\" \"*.js\" --fix && stylelint \"src/**/*.scss\" \"*.scss\" --fix"},"keywords":["event","eventemitter","event-emitter","aggregation"],"author":{"name":"Alcumus Group"},"license":"ISC","devDependencies":{"@alcumus/common-tools":"^0.1.2","benchmark":"^2.1.4","chai":"^4.2.0","eslint":"^5.15.1","jsdoc":"^3.6.2","mocha":"^6.1.4","nyc":"^14.0.0","sinon":"^7.2.7"},"dependencies":{"lodash":"^4.17.11"},"repository":{"type":"git","url":"git+https://github.com/Alcumus/aggregating-event-emitter.git"},"gitHead":"f2ffa4ed54b49b2f251a952394f74b6a37e76141","bugs":{"url":"https://github.com/Alcumus/aggregating-event-emitter/issues"},"homepage":"https://github.com/Alcumus/aggregating-event-emitter#readme","_id":"@alcumus/aggregating-event-emitter@0.1.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"thor84no","email":"thor84no@gmail.com"},"dist":{"integrity":"sha512-ikl9wRfFatLFycqOLDvmWUpopVPUb+U4Ng9l8b7lv2IOPjDHYC724tB0dRAHGs6O5PnMPlXjdIO3JGicqaG31g==","shasum":"2407b0a56713f7891f3a342d168c04db355b3780","tarball":"https://registry.npmjs.org/@alcumus/aggregating-event-emitter/-/aggregating-event-emitter-0.1.1.tgz","fileCount":39,"unpackedSize":1483388,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7/DNCRA9TVsSAnZWagAAoi8P/jeI8/JqifZeP+EPo3KJ\nAglZnNlfn2sWNJ9iapK+vmQka57YlT0Yn4v5IElIfDGaEYZzbxbzsIAbDZyC\nxk8KNWDdpAD8T4Oy222y53lrJSbOOqPMcaP7Ovi1VoPEfQFwM/9TGCIPTIuj\niwNAUxd6gMMlaXKPsnkKHgO1+Zt98skrtWaHuK9FZq9MsKc6DGLDE0Wq9Cbu\nN6aTqN8VR+USPLZKdaLdFDmaxUtTWr6/4YsJn7KXGnBkweyp/pP3/hawaSoT\njuoBkw5sLnDouD4UNiU0FmuISIW/we48qBi+FtSYoCiK5B+jXMaW3Ed5PnHS\nY8Wq+ib0u2Ca6PB1gMF91F7WyW+U4kmDgmY9IWVO2fuJG8/YPeKjO1mKNkJQ\n24T7kZJh97k50rMwu0+ZZxN421GsQwGFi2NLvdbxs0Lnp+tcm/CUbveNdkDH\nf2++Y8lET439cPEhnBtNsbD32RC+VCwYyW4D6AYOSnacc0WqoI94E9q/kUqX\nm8qiWxkCyQeHiUrwaM2iguw3UeGrj20x06DhpmWvS1TzJuUvACCYIQKgrH0A\ntaYqxan9JKzWUsEFKBF5Sry/j2j/ft9Tvt5IqIEaY4G3sC1XvOx12mtDpK85\nAP44qErMsimSqdCmCxe+f5bSfl+6W7wjTMdJ2i8yfUgWfyEDY1rZk2YX2ec5\nYvjK\r\n=61GV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAiDLYMIGCfgkl3duNZRwx0UaGAtK6AfEW67lRJqdveHAiEAnIT26RQZ+KUpGYXek+szjdatz22toSGaTSv3xa6eV8s="}]},"maintainers":[{"email":"dave@davecozens.com","name":"davecozens"},{"email":"itinfrastructure@alcumusgroup.com","name":"itinfrastructure_alcumusgroup"},{"email":"lauren.mae.welsh@gmail.com","name":"lwelsh"},{"email":"nia.evans@alcumusgroup.com","name":"nevans"},{"email":"simon.fuenffinger@alcumusgroup.com","name":"sfuenffinger"},{"email":"thor84no@gmail.com","name":"thor84no"},{"email":"michael.john.talbot@gmail.com","name":"whydoidoit"},{"email":"nabeelamir2@gmail.com","name":"woozay"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aggregating-event-emitter_0.1.1_1559228621116_0.08604013031608604"},"_hasShrinkwrap":true}},"time":{"created":"2019-04-09T15:46:04.672Z","0.0.1":"2019-04-09T15:46:05.408Z","modified":"2022-05-20T11:04:50.914Z","0.0.2":"2019-04-10T14:05:57.186Z","0.1.0":"2019-05-21T09:52:23.937Z","0.1.1-HF-487-1":"2019-05-28T09:58:36.537Z","0.1.1":"2019-05-30T15:03:41.316Z"},"maintainers":[{"email":"itinfrastructure@alcumusgroup.com","name":"itinfrastructure_alcumusgroup"},{"email":"andrew.robinson@alcumusgroup.com","name":"andtrobs"},{"email":"matthew.mogford@alcumusgroup.com","name":"mattmogford-alcumus"}],"description":"An event emitter that provides both normal event emitting functionality as well as the ability to aggregate results of calling the event handlers. For example you can use emitAsync to receive an array of the results of all the event handlers that were tri","homepage":"https://github.com/Alcumus/aggregating-event-emitter#readme","keywords":["event","eventemitter","event-emitter","aggregation"],"repository":{"type":"git","url":"git+https://github.com/Alcumus/aggregating-event-emitter.git"},"author":{"name":"Alcumus Group"},"bugs":{"url":"https://github.com/Alcumus/aggregating-event-emitter/issues"},"license":"ISC","readme":"# Aggregating Event Emitter\n\nThis is an event emitter that works similar to standard event emitters, but is purpose built to use events for getting\ndata as well as simply notifying parts of the system of events. This is helpful for invertion-of-control approaches\nwhere you don't necessarily know what will be able to provide your code with the data you need, only that it will\nexist at runtime.\n\nIn addition to this it has useful features like wildcard matching and list item matching.\n\n### Installation\n\n```sh\nnpm i @alcumus/aggregating-event-emitter\n```\n\n### Usage examples\n\nGetting data returned by event handlers:\n\n```js\n// Handler.js\nconst dataEvents = require('aggregating-event-emitter').aggregatingEventEmitter({ name: 'data', wildcards: true });\nconst data = {\n    namespace: [1, 4, 9, 12]\n};\ndataEvents.on('*.data.get', (event, query) => {\n    if (query.$gt) {\n        const name = event.eventName.split('.')[0];\n        return (data[name] || []).filter(value => value > query.$gt);\n    }\n});\n\n// Emitter.js\n// We can reference the previously instantiated event emitter by name and don't need to provide other options to it.\nconst dataEvents = require('aggregating-event-emitter').aggregatingEventEmitter({ name: 'data' });\nconst data = dataEvents.emit('namespace.data.get', { $gt: 5 });\nconsole.log(data); // [[9, 12]]\n```\n\nWaterfall:\n\n```js\nconst events = require('aggregating-event-emitter').aggregatingEventEmitter();\n\n// These event handlers will be fired in this order and the output of the first will be passed to the input of the second.\nevents.on('my-event', (event, array) => array.map(value => value + 10));\nevents.on('my-event', (event, array) => array.map(value => value * 2));\n\nconst data = events.emitWaterfall('my-event', [0, 5, 10]);\nconsole.log(data); // [20, 30, 40]\n```\n\nBe aware that it's fully possible for one handler to break the data structure for another handler if you are not careful when\nusing the waterfall functions. In order to mitigate this, it may be worth using hooks to ensure the order is appropriate.\n\n# API\n\nThe API docs are available here: https://alcumus.github.io/aggregating-event-emitter/\n","readmeFilename":"README.md"}