{"_id":"@asledgehammer/pipewrench-events","name":"@asledgehammer/pipewrench-events","dist-tags":{"latest":"41.73.0"},"versions":{"41.73.0":{"name":"@asledgehammer/pipewrench-events","version":"41.73.0","description":"## Description PipeWrench-Events is an extension for the PipeWrench library, packaging Project Zomboid's events in an API that takes advantage of the TypeScript environment. [EventEmitters](https://github.com/asledgehammer/PipeWrench-Events/blob/398ab4405","scripts":{"build":"tsc"},"main":"./PipeWrench-Events","types":"./PipeWrench-Events","repository":{"type":"git","url":"git+https://github.com/asledgehammer/PipeWrench-Events.git"},"keywords":["pipewrench","pipewrench-events","projectzomboid","project","zomboid","pz","typescript","typescripttolua","tstl","lua"],"author":{"name":"asledgehammer"},"license":"MIT","bugs":{"url":"https://github.com/asledgehammer/PipeWrench-Events/issues"},"homepage":"https://github.com/asledgehammer/PipeWrench-Events#readme","devDependencies":{"lua-types":"^2.12.0","typescript":"^4.7.4"},"dependencies":{"@asledgehammer/pipewrench":"^41.73.21"},"gitHead":"5e5ff7a9dc1cbad7c20286e5171017f9a43c63be","_id":"@asledgehammer/pipewrench-events@41.73.0","_nodeVersion":"18.7.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-GV8q+aJJh93yB6IzXnFS8MAV7PJYwdWhMQKb1QZP3D8PFX/RRDXkZlMQq2xq2hxpyy5nNBGhfVCJ8XDE5ml+/g==","shasum":"615222aa961bfb347fae5645c61096a78eeea272","tarball":"https://registry.npmjs.org/@asledgehammer/pipewrench-events/-/pipewrench-events-41.73.0.tgz","fileCount":8,"unpackedSize":95129,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEAKYS31X+aVddDw8R25psbkhJORUznaMxJjt78daoUjAiEAnuQ3WHKP3c2Mt7EfZBQO1RxLznv1Fn78MITlyaXB9tE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+xSmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4ag/9GT8o1Bj0br1hgWi3gaRzsPDaxi3Ipgv8mNlDG9IYiHO2dTmB\r\n9K/QW6dRE1dIo6DEbU0J+NNY/9wVpfpXOP1z6WT1ZdS7xqHWMKsgTjBdTo6U\r\nM7j6i8fOx1fBAUcCCiCFYmF5gAjstFgM854jShwmxIXfaegiMiStbcEtcfjh\r\nbyUzcoVv+QNpGodh+Mz1i+6xMy0uCZzSzS9F99ix1vVNjhCsAUcdZoUq9reU\r\nsJx96OwnC2n0+tc9nWG2GHpd/cd0p3GKDEhdR1yAoyucxFnfmOsT3HSQ0yu1\r\n4brZxc3i3zrO/1dRyTP+Oqkvb+M4fwS6wV5equegaPa/1W24VO8Li0Hn9vHG\r\nCUoK+/AdAWIEg0GfNVZIeLHpUPPwSIZeTB1jH07SeQXi0BcKYGpV+SCHEvDL\r\nKVyXDkUcEjvzKal3aQ0X3+vc6zVGYR2S8Xu77DPZwcM3ax736VgKz986NcVs\r\nA35GSd/5uQ176WLre8pWE3prGJbnJCv1DKC+MtKP6qkvjHXVuAdpp3nGb0Ky\r\nGtLyy5ZWcP3rHjQr5A/Kmd76sQyUjetvYfZjhIWnVM5bJBasAP33PtgkDuiP\r\nogGdxP+XYP0SDnJAEq6Zj1iSVTf8ezGVmETHMuiAnJd1ZJduWW3FnKclAiiU\r\n/CCPIq+jiZI38gwdeUsP56KVycTsRoOZSxM=\r\n=0JBR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"asledgehammer","email":"asledgehammer@protonmail.com"},"directories":{},"maintainers":[{"name":"asledgehammer","email":"asledgehammer@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pipewrench-events_41.73.0_1660621990571_0.5893601100220869"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-16T03:53:10.510Z","41.73.0":"2022-08-16T03:53:10.719Z","modified":"2022-08-16T03:53:10.872Z"},"maintainers":[{"name":"asledgehammer","email":"asledgehammer@protonmail.com"}],"description":"## Description PipeWrench-Events is an extension for the PipeWrench library, packaging Project Zomboid's events in an API that takes advantage of the TypeScript environment. [EventEmitters](https://github.com/asledgehammer/PipeWrench-Events/blob/398ab4405","homepage":"https://github.com/asledgehammer/PipeWrench-Events#readme","keywords":["pipewrench","pipewrench-events","projectzomboid","project","zomboid","pz","typescript","typescripttolua","tstl","lua"],"repository":{"type":"git","url":"git+https://github.com/asledgehammer/PipeWrench-Events.git"},"author":{"name":"asledgehammer"},"bugs":{"url":"https://github.com/asledgehammer/PipeWrench-Events/issues"},"license":"MIT","readme":"# PipeWrench-Events\n\n## Description\nPipeWrench-Events is an extension for the PipeWrench library, packaging Project Zomboid's events in an API that takes advantage of the TypeScript environment. [EventEmitters](https://github.com/asledgehammer/PipeWrench-Events/blob/398ab440505416eb250f430c8776969a4ec8bd45/PipeWrench-Events.d.ts#L74-L89) and [EventConsumers](https://github.com/asledgehammer/PipeWrench-Events/blob/398ab440505416eb250f430c8776969a4ec8bd45/PipeWrench-Events.d.ts#L292-L298) , are provided as events and their associated consumer types for listeners.\n\n## Custom EventEmitters\n```ts\nimport * as Events from 'PipeWrench-Events';\n\n// Example consumer type\nexport type MusicTrackUpdateListener = (\n    track: string,\n    volume: number\n) => void;\n\n// Example EventEmitter.\nconst MusicTrackUpdate = new Events.EventEmitter<MusicTrackUpdateListener>('MusicTrackUpdate');\n\n// Example implementation.\nMusicTrackUpdate.addListener((track: string, volume: number) => {\n  print(`Playing Track: ${track} (Volume: ${volume})`);\n});\n```\n\n## Setup\n- (This library is installed in [PipeWrench-Template](https://github.com/asledgehammer/PipeWrench-Template))\n\n## Notes\n- The documentation is transcribed from [pzwiki.net](https://pzwiki.net/wiki/Modding:Lua_Events)\n\n# Support\n\n![](https://i.imgur.com/ZLnfTK4.png)\n\n## Discord Server\nhttps://discord.gg/u3vWvcPX8f\n\nIf you like what I do and helped your community a lot, feel free to buy me a coffee!\nhttps://ko-fi.com/jabdoesthings\nhttps://www.paypal.com/paypalme/JabJabJab\n","readmeFilename":"readme.md"}