{"_id":"@axel669/twitch","_rev":"18-42f050d1e7376769a54b9666f22d2fa6","name":"@axel669/twitch","dist-tags":{"latest":"1.2.1","beta":"1.1.0-beta.0"},"versions":{"1.0.0-beta.0":{"name":"@axel669/twitch","version":"1.0.0-beta.0","description":"","main":"index.js","type":"module","scripts":{"build":"rollup -c build/rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"license":"MIT","bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"homepage":"https://github.com/axel669/twitch-chat#readme","devDependencies":{"rollup":"^2.69.1"},"licenseText":"MIT License\n\nCopyright (c) 2022 Chris Morgan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@axel669/twitch@1.0.0-beta.0","dist":{"shasum":"cb100c3e1f1daae73cef89160b859a5b0f01b2fb","integrity":"sha512-TxeGcauWFObkLFfpxJpLS9+mfv1zCwV5gUu2N2uHgBqvzcyAkEwWzzCFF6NmMj6Lvmd4MQJqWPGJ6X7pK7U8kw==","tarball":"https://registry.npmjs.org/@axel669/twitch/-/twitch-1.0.0-beta.0.tgz","fileCount":11,"unpackedSize":22385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiI8a7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqkmxAAkBEK4y5XityfnGeR4XDawq25v4QHyNFDrOdCEj/58vWmEXuJ\r\nTzJVWAtNcG2wMvfzwshmvFOFjjRSFLdVql4e5oRc+m9Pt7lJuus3voE6SE/Z\r\nkO4NPgktC9yO4Kb/LQpQJXwKZTRw+h/yDmYloyF17mO7tEUvHtFv9E7kWn8b\r\naODVRBdXYnEx/mO3CMztTE3Po5X73paL4VRgYeUXGHjhiVbjAnp5PbMABu0y\r\nsJrIq2vpfPvqsfqlK2UsXMbzy8EZFvg5iHGyJcj+ScZstDML+++6hUO7ooXj\r\nBXVbpTkA++RMqN1EmXaP/D6qsW3U2opskMmVUZ8UxHxNLKzW1LAje3/68dl1\r\nBjRfm3W3hFal++vp9pahXUEaCjE2GEiEn4kxf6WMWzRLv/BYcXuOrdtDDRzP\r\nTfl9Hk/PYzyG76OiQMBEcGyihDEltbTLR0KPPDLTMuC3/jLVekOLgxfF9vm1\r\nR1T97H+T2XF7Sg5fv5AfJVz3nj4/2KqD0pHRAXJLR8wE30aSwiUkSi+inWVx\r\nojHbrR6e5cYHmaFgTaX3QF4HCFot0ANrfg7xvmK1Usf4dIqYTIbO1vjlj/On\r\nZfeDSvJ3R19iLB4Ufz28qA6Y3c0ks1tU6q8JqHZfNJoYhqPTGsRvwmXydWxv\r\nzyjvw0LPDNb3jj5zesoOWqy8n3kG5RwlYTs=\r\n=7YVs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEO2j+enKp2qKwG4nyeinXCN/WtM9gs2tMwCURt9g2aGAiEAqFzzgRWUrPMg5waI3jGjMHp/+5bqTwvUqsBGzGFsVKw="}]},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitch_1.0.0-beta.0_1646511803472_0.4474454672001906"},"_hasShrinkwrap":false},"1.0.0-beta.2":{"name":"@axel669/twitch","version":"1.0.0-beta.2","description":"Simple library for doing things with twitch chat thats made for the browser.","main":"index.js","type":"module","scripts":{"build":"rollup -c build/rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"license":"MIT","bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"homepage":"https://github.com/axel669/twitch-chat#readme","devDependencies":{"rollup":"^2.69.1"},"readmeFilename":"README.md","readme":"# Twitch Chat\n\nSimple library for doing things with twitch chat thats made for the browser.\n\n## API\n```js\nconst chat = Chat({\n    user: {\n        name: \"<username>\",\n        pass: \"<oauth password>\",\n    },\n    channel: \"<channel>\"\n})\n\nchat.on(\n    \"chat\",\n    ({ data }) => console.log(data.tags.displayName, data.message)\n)\nchat.on(\n    \"bits\",\n    ({ data }) => console.log(data.tags.displayName, \"gave\", data.tags.bits)\n)\nchat.on(\n    \"sub\",\n    ({ data }) => console.log(\"sub\", data)\n)\nawait chat.connect()\nchat.say(\"message\")\nchat.say(\"reply thread\", \"<msg id replied to>\")\nchat.disconnect()\n```\n\n## Events\nThe chat lib uses fires events that correspond to various things that come\nthrough the websocket. There is a custom event emitter under the hood that\nallows the use of namespaced events and wildcards (similar to things like\npubsub-js), and the return value from the `on()` function is a function that\nremoves the listener.\n\n```js\n//  will only fire \"sub\" events and none of the subtypes like sub.new\non(\"sub\")\n//  will listen to all sub events (sub.new, sub.resub, etc.)\non(\"sub.*\")\n\n//  will listen to specific events\non(\"chat\")\non(\"sub.new\")\n```\n\n### Event List\n- system - System messages that come through the socket (I got pretty lazy about\n    parsing these)\n- ping - Twitch sends a ping every few minutes, the library automatically sends\n    back the poing message expected to keep the connection alive, but you can\n    use this event to do something custom as well\n- chat - any chat message that comes through that isn't a sub-based event\n    (including redeems that have a chat message attached)\n- join/part - Sent when users are marked as joining or leaving a chat. These\n    are not guaranteed to happen immediately but could be used to keep track of\n    an approximate user list.\n- raid/unraid - Start or cancelled raids\n- sub.new - New subscription to the channel\n- sub.resub - Resubs\n- sub.gift - When someone is given a gift sub from a user\n- sub.gift.anon - Gift sub from anon user\n- sub.gift.mystery - This event is fired when someone gifts to the community.\n    The individual recipients will each get a `sub.gift` or `sub.gift.anon`.\n- sub.upgrade - User continues a gifted sub\n- sub.upgrade.anon - User continues a gift sub from an anon user\n","licenseText":"MIT License\n\nCopyright (c) 2022 Chris Morgan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@axel669/twitch@1.0.0-beta.2","dist":{"shasum":"c6619e1de320f4458b0ac1096c4a8dd3fb287c59","integrity":"sha512-l1RYisvTUB4wn8bGyOAtqdvaHzq+H+HRh+yx6wMBhvglVzv3m+GRwAL4AsFC1IhlNMf2JOjuFwrZI8Xlh+LrvQ==","tarball":"https://registry.npmjs.org/@axel669/twitch/-/twitch-1.0.0-beta.2.tgz","fileCount":11,"unpackedSize":24722,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJDDqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpliA//SxgGpYoyikVHcGdth1Cr7D3qWfopDfUNjTZ0LI2yIjlcCG6H\r\nF6xEKPMyHb9lU1dTNX7+UhBfE2FZemFWi7tKdr7su/hFJhqDYMivpQ3+W2fV\r\nvFE1CFbW8oaMZy4Z9OIG5Ks1qSyc811gryzckjyMlWthKeI8hfHKfiOP+Sdl\r\nqeN2Ir5ZXD7lAZy8/iT4VFL29pzOJnyVa8hUdaL+flxa4QCYL2JeEPYfI44j\r\nW1dtVDtmmyCpNVy/mCexGeBZnuMcJ/4SfeWT3a+X1nyiZzGBBQSjKF4XlFC8\r\n/nSKqmCxKXCWWpsFd/uchMPPPfqIHpMa3EYi8laFTXulUqxCQ2iKLj9AzZaC\r\nwj1ly+XqyG8UGgRmArA/CG9Au24g75gj8UU0qIcNGM2nK6enr43tNftNCiUI\r\nGf+nLQw5fu+zn6Yx/ye8Zpt1Bs+Jjqo1z5XwcGjHWplrQBaUmr5DMvAybrsS\r\ncmTn0woQM0u7wu2Yl8frn7FoTwkcdsrEE15YPnscVU+x6GP/x39822yQaHuF\r\nQPIacbdrHAw07KwytMOUJH2WKmpmuVgYNEQaJDiRsdb7vlYzL7R4zDImJ3kt\r\ns75wr1IkJYOT3VFidueQMIU2w0Uc9bDb43qQSkfFUE07J3Q6UWTQ4Zl2odol\r\nkT4BsU6CfUrjn+b5WYO6J8CIvo97glzHl8Q=\r\n=wlJy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBn+e/3fxq5qPI+JPHSgqILXka8vfdBDz9NJK3h7RdDgIhAMMZEz2w3jJfV1D+6ZhKF750qBF0EPQ+ZfbWz0M6ATaM"}]},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitch_1.0.0-beta.2_1646538986404_0.5597780936614309"},"_hasShrinkwrap":false},"1.0.0":{"name":"@axel669/twitch","version":"1.0.0","description":"Simple library for doing things with twitch chat thats made for the browser.","main":"index.js","type":"module","scripts":{"build":"rollup -c build/rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"license":"MIT","bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"homepage":"https://github.com/axel669/twitch-chat#readme","devDependencies":{"@rollup/plugin-node-resolve":"^13.1.3","rollup":"^2.69.1"},"dependencies":{"@axel669/event-bridge":"^1.0.1"},"licenseText":"MIT License\n\nCopyright (c) 2022 Chris Morgan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@axel669/twitch@1.0.0","dist":{"shasum":"d1279033ed565c9d9968236ca6477f695a642d51","integrity":"sha512-0AAgw+UNsgcYiKwWgF1zd1fEdtHD4lfjWvE5JmqHoFwtZ/2uDGvR5zfKvsoSrm83/0AgjKtazvpzJ/x7PSUEUQ==","tarball":"https://registry.npmjs.org/@axel669/twitch/-/twitch-1.0.0.tgz","fileCount":10,"unpackedSize":25654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJpsjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrU9w/+N6aWPt6abecbJewRxdUrPaKQvyPDTDD/oYyQV5NRZyRDzJFR\r\nWR6hPYg+aNDZOD62Ao5tm5TFUL6FP8L8PMt5u1FkH7H2KjzJZgl5fR4crHMZ\r\nw8pRIP7z4UyVtIwSi4+Qa3N8wpPgejQpsoCGqwnFX36A9BXfKA8Qt80oN5/v\r\nfEViKpZFtfZqtKsXdpbVWBo9YQd5port+Cp/nl+NEmYhjakPzE/qTyCKUWEm\r\n/YajxBum8MLwxMtarJNAcXaWJLn+H+oiS64ywbbQRrZF68+B6R0k0jf5WgyA\r\nBM7HisFpjuvLGOMiUuHyrHRINxg8RHPVKDtdHqhEeDczNhO+vjSZ5A1QVw6c\r\nUppAZikeS53tuUqYolT/aDinoU2V6ZkjtkaOQ+SsEcR1Oxm6NPnWCIYEz0WB\r\nWCLMj+U7WTcC/OJ7bVJz78DMluonYD22uR00u6KuROuoYvgPBWbg+e7EcG4x\r\n6PrADe5sCRtaRMzVeLjAI+AtUWn0KFwhqK5cU/SYqOtJbvTeQvGAvRyNYruK\r\nsAp+K2dKMYSTasWLqORUwW4z1gru2DAl89W+iAe+CGpwe2iOl1kL8T2pQm5N\r\nnUOaePaLgQj3ixYc/OfTX/lrwtH3KR7NAqxflvTmctk21IXFVrEDMCaVcRek\r\ncKiDr6hmOb9d0zHRLufq0ORA2Fd1+sgRC/A=\r\n=jAiX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMQbAiF2avBAFvpqjdMeS/W5GIC2iwvPjwjWwHqSmkAAIhAKpoM9kvixUb3lyRNLWCIA2ZG4jvXoV+TE60VTdF8lHQ"}]},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitch_1.0.0_1646697251460_0.6839379013594831"},"_hasShrinkwrap":false},"1.0.1":{"name":"@axel669/twitch","version":"1.0.1","description":"Simple library for doing things with twitch chat and pubsub thats made for the browser.","main":"index.js","type":"module","scripts":{"build":"rollup -c build/rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"license":"MIT","bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"homepage":"https://github.com/axel669/twitch-chat#readme","devDependencies":{"@rollup/plugin-node-resolve":"^13.1.3","rollup":"^2.69.1"},"dependencies":{"@axel669/event-bridge":"^1.0.2"},"licenseText":"MIT License\n\nCopyright (c) 2022 Chris Morgan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@axel669/twitch@1.0.1","dist":{"shasum":"d435bb59bef7ba8118f7f09d7a6cd57e45cc3b13","integrity":"sha512-CS7PUYgz4yGNTsNyGW15OegRtC3BELg62H63oyWriRRVZlfGm7rupmYpJhhPedBQhcztP81cHGqCKhQRY9CWxQ==","tarball":"https://registry.npmjs.org/@axel669/twitch/-/twitch-1.0.1.tgz","fileCount":12,"unpackedSize":59553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKFXwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoiJw/8D1chdZFTHkiLyoBWBbUgnTa4PmmO2eijZKB5ZWTjGhAIgr0n\r\ncz85PUJhx4F1Yl6aWM9MQdwjV5/m+kAf5QVtLC9YYnxnlIl7ifS4fynn3Ahf\r\nzmExDg5RtjZHRuSteleGX7zDyaOfh2QLX1du/DHUEkdi92sTx+vHrUwTZm7P\r\nP3b8iwpjRvPGMegIDzH/Rg2XWpg5By4aCdi8s17nKs085A8pFsKp4exbQ2v6\r\n1lVYn2y5zf2qTRuMvtqvbbvKzbCbn9pROpiBRtIcWUI6RzqoLGHOcidz4FhA\r\nOss7U25ygSxUrbJDdGbhk2+UvrW7ks+zuGuHANnUj19hrQ7jTP6f2bosgHaf\r\nz07wfm4ogQIJYmC50GDNVjWqdlsdnzr/CLRNy1Yt/7/zUsrO04zxJlTo6PDD\r\nKShzDgrAwpV81nvMcdmETXdaQ3OHf6VtD7X8ZCmHLTAxkcj/87/rDe872+sI\r\n75E0wDOpN/UtCwSvlxf09E2ZpUw84zE0p0N2gnijnZIBjLEzL3g8YkKn40ai\r\n+MdOa+BNkh1Xale4RBS5sHKt974MtpVH+yGbjmbdSidhaJdKhKNjPfd3rTkV\r\njRL2fk7Mav6PC+8xfgCFhyRd2xipamrwUGSzy8eG9hu1fuNxDKT2bZPXnNYk\r\n+23X4eRtbjVabuIQHXb1GANfjY/4zPQA3EM=\r\n=8PIt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBladZElq54CH/ePe2gd83RfwAHa/1d7sGTjHmPaa9zUAiBF3kzISnMeNNEV0OxRBeGoV5rCjO5KqJWc51Ye6IOLaA=="}]},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitch_1.0.1_1646810607900_0.8152736848224551"},"_hasShrinkwrap":false},"1.0.2":{"name":"@axel669/twitch","version":"1.0.2","description":"Simple library for doing things with twitch chat and pubsub thats made for the browser.","main":"index.js","scripts":{"build":"rollup -c build/rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"license":"MIT","bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"homepage":"https://github.com/axel669/twitch-chat#readme","devDependencies":{"@rollup/plugin-commonjs":"^21.0.2","@rollup/plugin-node-resolve":"^13.1.3","rollup":"^2.69.1","ws":"^8.5.0"},"dependencies":{"@axel669/event-bridge":"^1.0.2"},"licenseText":"MIT License\n\nCopyright (c) 2022 Chris Morgan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@axel669/twitch@1.0.2","dist":{"shasum":"0b39757bea5169cd1aff73bd7c76b9e530020acd","integrity":"sha512-NaOGfXqFZfeEJGSfbqfxh3deopUXT5CwVAgLAK3lMwJ2vHRk7LhJY/PvLtU+njTmEHmcc3Y44tVJEgUWDMfBEQ==","tarball":"https://registry.npmjs.org/@axel669/twitch/-/twitch-1.0.2.tgz","fileCount":16,"unpackedSize":60691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKZJdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpc0g/9F4rvwv47D9kVDC5wxZuZOY0VTsDyg5ahSe264/m3PwHHBb53\r\nsKNustpnblGBvlevGLOdCYcWyR/Uu0dyJPL+bGeFoZWk0fZVi3XxOKtMH2+G\r\n1a4keJfv/UVGAcnhb7hqPU4T/Yboq/M2Oc1W5+eyuhw6xfmTTpt9ZOqmqWzf\r\ntExbBk1r5LIx73+iaeOPUTy6eBoUNACWnjqvmP/ERuHV7rDTeNpvbrZEtLfA\r\nkMgjuVm7ccw52XnD3VrVnncahwRxFnkrCOY2tb0aFdyDyzCYRHRJFVKkcl8J\r\nCCV9zWB39KXwAx+fz5RDti8B/d/ZhWkXqMTkvBSmMoPWT+lzP/I4mdVJjmIu\r\nEyBLP4fzR3telEF7+WJKKR3AAIRyIyG53i0CE/srU9cDgXsqp90AH+Npd6fW\r\nx/bdr0JzqGx5HuF4JtIOTfKs+nCWJIDnxGXVjGOreSfMvS/WjKzxsjMTFt7D\r\nLAD0gazAXu00pOYpzl5Xp5RlqnTIN1hkSChlfTg2rQppJsYMXGcSNL1Nh9nP\r\nFf2qBSea/8gqWUydAx/7jB0JsFvFux4ASDhHo7Pw0OW7Dh3Dfk7FkD7qPCVR\r\n2TNU4pXVftEe/V99nsvNsgt3RXoVMSabqamUixajBVZjDqBivBmbStLm40p9\r\n0vVkkvhjPDvunSTIwjnI0MO2xO8mdLLHE+g=\r\n=Z7kE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICCxLFypvCv46vsIDLuz3QM5v3onpn53LBlxElk9l+TPAiEAoolDOY5w2fyzv/ByhGwfqWv8lzx8uvjdE7Ym46MsSss="}]},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitch_1.0.2_1646891613149_0.15874386840615595"},"_hasShrinkwrap":false},"1.0.3":{"name":"@axel669/twitch","version":"1.0.3","description":"Simple library for doing things with twitch chat and pubsub thats made for the browser.","main":"index.js","scripts":{"build":"rollup -c build/rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"license":"MIT","bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"homepage":"https://github.com/axel669/twitch-chat#readme","devDependencies":{"@rollup/plugin-commonjs":"^21.0.2","@rollup/plugin-node-resolve":"^13.1.3","rollup":"^2.69.1","ws":"^8.5.0"},"dependencies":{"@axel669/event-bridge":"^1.0.2"},"licenseText":"MIT License\n\nCopyright (c) 2022 Chris Morgan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@axel669/twitch@1.0.3","dist":{"shasum":"f65618f13f3bc875b33081d93cc77e23440d0890","integrity":"sha512-z96TBBA6M4jTJ4n8pKoo4iC6w+wVVJ+t2voxIVmIQgfvf53vqRIyWgthCfqFmct/n1CdOiZxCfUFz0R6L7JXhQ==","tarball":"https://registry.npmjs.org/@axel669/twitch/-/twitch-1.0.3.tgz","fileCount":19,"unpackedSize":192282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKZOrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr+OA//Z5kd+Blon1+1SHvegM6YH0zTefm2SBXZBZrVFs6sGjeoiMiQ\r\n0cxd3GHxMKR4M6PZ3QOGjqbszel30W8o6/+PEXIYMXmpIOUcH4fGSA3Rj+Ha\r\n7A66TQhfuoWATpIflNtIo2IUlKZolAIKXoC9UOxuInA753ktK4ykD2+WqZ19\r\nnl8/n/SbHmSBDWYcIX2CzBAmvggo7Q6LyW+LJCrmVAyniw4D54wnbZO7IpXX\r\ne6Y3z/HFXspyUoNNl62hMcbSHbWuiN+6jdGcw7/MeKQLfWNRHvfiFws/8+eV\r\nUN0QAXsB3GCtWVRSGCbwXWGvXg6AUVXPYeFep9CzRaDAf88TW4Mn0S65hMns\r\n4thHv63jz+eGgWVFeSlTWTHSVXQZ4eEdL/rTlW2Y17sU1ulp6Kz2y8qzfjNc\r\nV4EtWdzDGzV63UhZ/bfV8LAfFrC+JZosm6tj0CGDXggBeH/zDIJIQE+oFQwE\r\nkRphpO/ZIY5yMtL4sDQQxKj/v1iz7GTkhIkf1CSiNNpo8R1m4L/VR6Pbx9GW\r\n7JMNGrPFtA+H466pjtPS3GUTqUWYJHtjUCklPGSZr8dMsDjKKRwT3cwb/lKn\r\nQ8CHBuCwmtyfKZY8s/SWYepRqxPugcPTztLVY0r9Up12olMWz2K50yEl4+01\r\n64APmlutBlKD4NH6I91FxLX86M5c21TCauA=\r\n=fB+Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFpHwmAMzbz5fFpINyt2BmxSVSyCTqfWaEuwqfxOig/3AiAZ0L1CbeZZEF4wPmJiswALk3sZp74hNvTAD8t1fHGhzA=="}]},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitch_1.0.3_1646891947650_0.6732817259118455"},"_hasShrinkwrap":false},"1.0.4":{"name":"@axel669/twitch","version":"1.0.4","description":"Simple library for doing things with twitch chat and pubsub thats made for the browser.","main":"index.js","scripts":{"build":"rollup -c build/rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"license":"MIT","bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"homepage":"https://github.com/axel669/twitch-chat#readme","devDependencies":{"@rollup/plugin-commonjs":"^21.0.2","@rollup/plugin-node-resolve":"^13.1.3","rollup":"^2.69.1","ws":"^8.5.0"},"dependencies":{"@axel669/event-bridge":"^1.0.2"},"licenseText":"MIT License\n\nCopyright (c) 2022 Chris Morgan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@axel669/twitch@1.0.4","dist":{"shasum":"4ddf64a00f0dd0c34583a11919540a55b85cb421","integrity":"sha512-zTZSsWB3YFmizJ546j17hGXc7fGNxnV3DlQfqjiEsSil25aNLrBw0QW3I9ANwxGswJVrr75dPl2mnpzWRfRGrg==","tarball":"https://registry.npmjs.org/@axel669/twitch/-/twitch-1.0.4.tgz","fileCount":19,"unpackedSize":192290,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKtMeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqnpQ//cm4Q1tsBx+tD96PxnEw0dN6r0QmFd+9S5MJQbYKauKXWBENd\r\nxe/qOcqGn0wvDCmerpmEDo5M90i8RJYFmKHmg1ggwlv7W28v2Fxy6aTfx3Ni\r\nxVhkeRoCOwpI8+hHTcfYkiKkkdUnhrjdK8WpW1aTAPr9yIzWXzvyLxLLE90+\r\nuTiRZMl2/hTJlbXglRKvxTYsBKYDLnlusz8vEor0wEV9UiImZlimDNGML4Bh\r\n2eULRXK7H882b6sNcRHcV7YW9KcReBSJLJ1Z1Rhuou8+4CvxS8UvTiMkO/wm\r\nxb1Zj2yUb05LNATRs+NkirXpAljwy3U9IlmHS7h2D/1BhjpZqCP5hF0Ft/sG\r\nZsaJAoB6neWnQXmJH1NO4jrLdFtGbbhv5w1+L5xcdeQEBStgr9r0Cgepdm3d\r\n6lYzkVvMJxYGoJ283URQTt0lHxnLlAyPLVRvP/33g/yu3Mafjc4BnlUoFcuM\r\n/dRTTxHlSsJsF1BNOO+kPusWyv4cINCEG8jGor0cWQKK/ayeOT+p/0YOzK89\r\nJBm43/X5Lm7NP1lrJz/hsDXX83uBKFRxeT33BWQ1foeTuFVJvw+nmrvYH4Il\r\nUDDtlWaZIc+B71OUnnZ3r2aJj84MG1anr2eEWH3xBslfBghWeLe83IGJU/3T\r\nr7BTM0BUrAXBz7zZfSiLz0LDQKyIwn1Otog=\r\n=crNv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGpTjSsP54ADDXKQ71NcOf7Dowo8M7rS/iRkLvjvNvE/AiEA3T4nAl3cqARmGlRKTmN1TMdfoDCo43JCrzXrmOIDwiY="}]},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitch_1.0.4_1646973726282_0.8326363287904894"},"_hasShrinkwrap":false},"1.0.5":{"name":"@axel669/twitch","version":"1.0.5","description":"Simple library for doing things with twitch chat and pubsub thats made for the browser.","main":"index.js","scripts":{"build":"rollup -c build/rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"license":"MIT","bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"homepage":"https://github.com/axel669/twitch-chat#readme","devDependencies":{"@rollup/plugin-commonjs":"^21.0.2","@rollup/plugin-node-resolve":"^13.1.3","rollup":"^2.69.1","ws":"^8.5.0"},"dependencies":{"@axel669/event-bridge":"^1.0.2"},"licenseText":"MIT License\n\nCopyright (c) 2022 Chris Morgan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@axel669/twitch@1.0.5","dist":{"shasum":"aee8c2184f7ff547309f6f3a19e31ec0c10d0b31","integrity":"sha512-C776H8IR10g3qNJFAZk7ivHB2wipVUupiAjJlvQ+YhfnLj+JkGXUXY4VPBsmDHI66i5oJmdZbgwMmV0F/GN6OQ==","tarball":"https://registry.npmjs.org/@axel669/twitch/-/twitch-1.0.5.tgz","fileCount":19,"unpackedSize":192294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKtPlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpbCA//T7FK8g8xi3vA9NV8eZc001mmi6SrO7WCNoTbgJLtDQeciRo2\r\nLmu3kNSshxVFAEdvKjaddSch0HE/43/CYb0/c1Mxqe0H7oPr3PIndKUnclDf\r\n2DtgSMQXR5NR9N4BUKgUL5/IU50ZAX//BaFtWKLN1P+5WwDXCRKgIJz/29aT\r\nvFtr3w/lPy/vkYmZlkr9xufPdFq3K2mgLpzirPHYIKC5rPdsjIEnUKPIz/ar\r\nHSSLnTd0zC1ZZSweGP0I/6XK7uQr+fsL+8kUGN7EZtL720znI//gMvdKs34t\r\nfXeuMA64U1El7IRA+uzALKcmv1m8fwxPNN/RcQ0AzdvEBunh1yofYwnsO6DI\r\nYOvaP/BK+IksDOUhlGLp7/g5ymPQiopqzmjNRt5+/x0yfn9rYvC7j1gYRyzx\r\n769kSUfaGBSJlPL1ni2iJKkoa1ltEgbvKThniZeorfbH7lWNmZOoGJmf8RHW\r\nSlWh0Hgu6VCWpdnR9Rn3sLz31O+zwhHqVojMHZi89Qtpd2WtKJIFJh2SU6SJ\r\nNPJm/DC8kieR+DEJAOpbEMkBgGsTgdIEuukS7LEdX2MyKPf9jJK/KoUzGJ3F\r\nRomZJlSANRF6MAcjfSbwnZMsmrhRPCd954nXbVbnHWNeNJmuzxRmJtkU8ODP\r\nUUF3jVcKSya/S+tESEnKPKBOA/oZ1M1bOn4=\r\n=ETwr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzP30gG/OMZlWlbD1ZjYR+S4ARmZWoKL/s930LQ3tOjAIgZgMrJvhZhUNgZZ+e4dxZVbhbes9dqUh3JBbjTst9AKA="}]},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitch_1.0.5_1646973925333_0.14763902510814564"},"_hasShrinkwrap":false},"1.0.7":{"name":"@axel669/twitch","version":"1.0.7","description":"Simple library for doing things with twitch chat and pubsub thats made for the\r browser.","main":"index.js","scripts":{"build":"rollup -c build/rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"license":"MIT","bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"homepage":"https://github.com/axel669/twitch-chat#readme","devDependencies":{"@rollup/plugin-commonjs":"^21.0.2","@rollup/plugin-node-resolve":"^13.1.3","rollup":"^2.69.1","ws":"^8.5.0"},"dependencies":{"@axel669/event-bridge":"^1.0.2"},"gitHead":"af2cb82f7d5917fddc8787cb523e7d82daae277f","_id":"@axel669/twitch@1.0.7","_nodeVersion":"14.15.1","_npmVersion":"8.5.3","dist":{"integrity":"sha512-1rXLiHuh5J1McYMarJAvnO+czpreUOy3LZh1abL4EWbCG4Bnf3jwdgj9UjZJAcfVPb5s1IfzlGX3I6R2QINZBg==","shasum":"0b9a2f5b042cf1a6ced3d9a1183a5c6c9cc069f2","tarball":"https://registry.npmjs.org/@axel669/twitch/-/twitch-1.0.7.tgz","fileCount":14,"unpackedSize":194146,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0ro9C0roZ1yYdKMWvEnAwcbgpucP0cMQm35PBhCTIcAIhAIr8FedTWW10tI8LeIqMD0xwMhI8jfkDRelGolZlwW8t"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijF13ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmowlA/+OROw9PAQig74+kw5PtOfZmPpAHSAh3O3bf5qQPpVx7hyUZnh\r\nEoXINBzsFe99FpVUlg4KgFcA2zp8QlalQIFE23bCgXQaCi+KXriIgBEYZqB2\r\nJPA+ENfTphQ3FCGFvCajJ5shZV3JAs74XWgjghrkqyxwvOlGLNj7klDe8ex/\r\nUPeX2bmTviYbTwlsKZ7anMofi8xr3a+ynbC5OgDeONGNbk0iO+WK+wpo2ZYM\r\nqN2FtFNJmIUprz/Czz9fKOqQcVO1RSgCz4A+OdozSKiuaviQmE3eYE/UnP0e\r\nTyEML9zDqmGR1IJN2hg7EGQng1JiKNQhZk1SgCF0RQu+hP+72hE+zxWrvY9M\r\nJXkFfuj3s4Tk2/Vz6x/kBQM6KkUf9R/QREn7gVpyzKtRQHv3Gy54qWriAkjF\r\nvDHIwSzLrx+lKyQ9WDK5JaTvI0MPeT4cmWpkYSfvcD0k6xhJ1LFrFtWSN4UF\r\nkSkeEuXd7RC6dTtG3CIZVPd3QPs81ckAdbX6rcMs2uest6+EyEizVlEfAUfv\r\ncHmXqEOMmExlezLn6ntCSBJesi3NoPNZ4DIHoZIhHTTZOlEaSnN0VFRo5/St\r\nKL8Wabfsj3zfS4eqVpeM4tRUnvcLuuoOjIJ+6KoSxa7hWsT69bVUMwYif0Tz\r\nsG14VIecZwh3/tTY1yo4evYf+l+X4n1FYBM=\r\n=Y/tl\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitch_1.0.7_1653366135697_0.5336114968580106"},"_hasShrinkwrap":false},"1.0.8":{"name":"@axel669/twitch","version":"1.0.8","description":"Simple library for doing things with twitch chat and pubsub thats made for the browser.","main":"index.js","scripts":{"build":"rollup -c build/rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"license":"MIT","bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"homepage":"https://github.com/axel669/twitch-chat#readme","devDependencies":{"@rollup/plugin-commonjs":"^21.0.2","@rollup/plugin-node-resolve":"^13.1.3","node-fetch":"2","rollup":"^2.69.1","ws":"^8.8.0"},"dependencies":{"@axel669/event-bridge":"^1.0.2"},"licenseText":"MIT License\n\nCopyright (c) 2022 Chris Morgan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@axel669/twitch@1.0.8","dist":{"shasum":"4928494a358272e5113ed492654a0cf1a19a8845","integrity":"sha512-7wlq2Itf/GwF2ocBW2s+W9VAl+ii7a9L8pb7NeT43CwI+Iaj5oXlZ9lgvdZfxiOsVut8Xe7sYRAHccZXT2J36w==","tarball":"https://registry.npmjs.org/@axel669/twitch/-/twitch-1.0.8.tgz","fileCount":21,"unpackedSize":113931,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAZxVwO2pc6wYtFCi0WHF9+zhgWaVTayrUN994Lt2Q0ZAiEA8mm9PeeH7+Pumls+72cYI7TABYJIELo/M38d++A+cOY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiu9BGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoqHA/7BX7ihPR2kRjCRz4Omx4ot44XyycupazwfgMPMMiy/+cFUPDB\r\nZn2k3oHSooU9hpyLaEPCdtOWrHizjVeoQC5mWzFgFGEBYxksUBr1UAULMg50\r\nQNMpK4gMA7d30ayWtWxbVJE4TOeaXBDEhzOI0IBF2dPHkbCl3ugNfMDCY4VF\r\nQTI7DjAlH6LGoa8jLARPlKZUSwQDb/c8KxNtw2NcfM2QcP81TLtM1voK0zZC\r\nIizd4W336qcS0zSldLnMoEn9j+jSKga/CJTT3jMVOU5JQRlRUjP1yBfJ+MB1\r\noJmiww/ROMsI7U1826INrubTBXd+MdV72t9fbgI+TxzLg6nOHNCePkYS4iw/\r\nuFQR8rrivjn8DaPt74l/3dvFeLUKJCw9NhAXX8/fPP0yV8ExlQnVd38zfesc\r\nhJ3Eyf1oGnzLdvmzXoXTyWZhFXkshmW5lhmkZ5+PVO0POc7fg3SQ5FkZ6ivW\r\nXAu8OndGQyl4OtxMUFpN15LIG7XDjon3rOVLpHoJDVFZSCi/3+cYkjg8pkBZ\r\nU4wQGDIVTIAOCe4jGI5iwjLtZdQU5YHdi+fv1cokS72K1EHJIXiyguk+RYe0\r\nEx1cIyJtXVUhX6DZLPsN9kGqJ8u4FY1BcRjAVB5cp5IbsYZ/QYs0BgtzU0eY\r\ne8QeYGx1xRsFzQt8Sam0sjIuUpiqSvoOAHI=\r\n=OKjw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitch_1.0.8_1656475718300_0.5880152132950169"},"_hasShrinkwrap":false},"1.1.0-beta.0":{"name":"@axel669/twitch","version":"1.1.0-beta.0","description":"Simple library for doing things with twitch chat and pubsub thats made for the\r browser.","main":"node/index.mjs","scripts":{"build":"rollup -c build/rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"license":"MIT","bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"homepage":"https://github.com/axel669/twitch-chat#readme","devDependencies":{"@rollup/plugin-commonjs":"^21.0.2","@rollup/plugin-node-resolve":"^13.1.3","rollup":"^2.69.1"},"dependencies":{"@axel669/event-bridge":"^1.0.2","node-fetch":"^3.3.0","ws":"^8.8.0"},"exports":{"node":"node/index.mjs","browser":"browser/module.mjs"},"readme":"# Axel669's Twitch Lib\r\n\r\nSimple library for doing things with twitch chat and pubsub thats made for the\r\nbrowser.\r\n\r\n## Installation\r\n\r\n### yarn/npm\r\n```\r\nnpm add @axel669/twitch\r\n```\r\n\r\n### Browser\r\n```html\r\n<script src=\"https://cdn.jsdelivr.net/npm/@axel669/twitch/browser/twitch.js\"></script>\r\n```\r\n\r\n## Usage\r\n\r\n### Client Side Bundled\r\n```js\r\nimport {Chat, EventSub, Multi} from \"@axel669/twitch/browser\"\r\n```\r\n\r\n### Require\r\nNo longer supported directly.\r\n\r\n### Import\r\n```js\r\nimport {Chat, EventSub, Multi} from \"@axel669/twitch\"\r\n//  also has a named /node export available if projects also use the browser\r\n//  import this can help avoid some confusion\r\nimport {Chat, EventSub, Multi} from \"@axel669/twitch/node\"\r\n```\r\n\r\n### Browser\r\n> If the cdn script tag is used\r\n```js\r\ntwitch.Chat(...)\r\ntwitch.EventSub(...)\r\ntwitch.Multi(...)\r\n```\r\n\r\n## Events\r\nLibrary uses [EventBridge](https://github.com/axel669/event-bridge) to\r\nmanage events, see there for more details about how listeners work. All of the\r\nobjects created pass the `on` functions from the internal bridge it uses.\r\n\r\n## Chat API\r\n```js\r\nimport {Chat} from \"@axel669/twitch\"\r\n\r\nconst chat = Chat({\r\n    user: {\r\n        name: \"<username>\",\r\n        token: \"<oauth token>\",\r\n    },\r\n    channel: \"<channel>\"\r\n})\r\n\r\nchat.on(\r\n    \"chat\",\r\n    ({ data }) => console.log(data.tags.displayName, data.message)\r\n)\r\nchat.on(\r\n    \"bits\",\r\n    ({ data }) => console.log(data.tags.displayName, \"gave\", data.tags.bits)\r\n)\r\nchat.on(\r\n    \"sub\",\r\n    ({ data }) => console.log(\"sub\", data)\r\n)\r\nawait chat.connect()\r\nawait chat.say(\"message\")\r\nawait chat.say(\"reply thread\", \"<msg id replied to>\")\r\nchat.disconnect()\r\n```\r\n\r\n### Chat Event List\r\n> This is a list of the events that are currently parsed and sorted through.\r\n> There are still some irc commands it doesn't parse (I didn't really see a\r\n> reason to, but I'm also lazy), and those can be captured with the `*` event.\r\n> Those events will always be full caps like the commands.\r\n- system - System messages that come through the socket (I got pretty lazy about\r\n    parsing these)\r\n- ping - Twitch sends a ping every few minutes, the library automatically sends\r\n    back the poing message expected to keep the connection alive, but you can\r\n    use this event to do something custom as well\r\n- chat.redeem - any *custom* redeem that has text attached to it\r\n- chat.message - any chat message that comes through that isn't a sub-based\r\n    event (including redeems that have a chat message attached)\r\n    **NOTE: highlighted message redeems come through here with the tag\r\n    `msgID` set to `\"highlighted-message\"`**\r\n- join/part - Sent when users are marked as joining or leaving a chat. These\r\n    are not guaranteed to happen immediately but could be used to keep track of\r\n    an approximate user list.\r\n- raid/unraid - Start or cancelled raids\r\n- sub.new - New subscription to the channel\r\n- sub.resub - Resubs\r\n- sub.gift - When someone is given a gift sub from a user\r\n- sub.gift.anon - Gift sub from anon user\r\n- sub.gift.mystery - This event is fired when someone gifts to the community.\r\n    The individual recipients will each get a `sub.gift` or `sub.gift.anon`.\r\n- sub.upgrade - User continues a gifted sub\r\n- sub.upgrade.anon - User continues a gift sub from an anon user\r\n\r\n## Pubsub API (deprecated)\r\n> This API is deprecated in favor of the EventSub API.\r\n\r\n```js\r\nconst pubsub = twitch.Pubsub({\r\n    user: {\r\n        id: \"<user id>\",\r\n        token: \"<oauth token>\"\r\n    },\r\n    topics: [\r\n        \"channel-points-channel-v1\"\r\n    ]\r\n})\r\npubsub.on(\r\n    \"channel-points-channel-v1\",\r\n    ({ data }) => console.log(data.redemption.reward.title)\r\n)\r\nawait pubsub.connect()\r\n//  some time later\r\npubsub.disconnect()\r\n```\r\n\r\n## EventSub API\r\n> This api is in beta because the udnerlying tech is also in beta.\r\n\r\n```js\r\nconst eventsub = twitch.EventSub({\r\n    user: {\r\n        id: \"<user id>\",\r\n        token: \"<oauth token>\"\r\n    },\r\n    topics: [\r\n        \"channel.follow\"\r\n    ]\r\n})\r\neventsub.on(\r\n    \"channel.follow\",\r\n    ({ data }) => console.log(`${data.user_name} followed!`)\r\n)\r\nawait eventsub.connect()\r\n//  some time later\r\neventsub.disconnect()\r\n```\r\n\r\n### EventSub Subscriptions\r\n`EventSub` connects to Twitch's beta EventSub Websocket. Topics are the exact\r\nsubscription topic that Twitch has listed for an event, and the events fired\r\nwill use the same name as the subscription topic.\r\n[Subscription Topics](https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types)\r\n\r\n### Event List\r\nThe `Pubsub` will fire events based on the topics passed into the object on\r\ncreation. it will fire an event with the type of the topic without any of the\r\nIDs attached. A full list of the pubsub topics and message data can be found\r\n[Here](https://dev.twitch.tv/docs/pubsub).\r\n\r\n## Multi API\r\nThe `Multi` function takes the `user`, `token`, and `topics` properties\r\nfrom the `Chat` and `EventSub` functions and instantiates both of them\r\ninternally. It fires events from both of them, and its `connect` and\r\n`disconnect` functions trigger for both internal objects. It also passes the\r\n`say` function from the `Chat` object.\r\n\r\nMight add other connectors in the future.\r\n\r\n```js\r\nconst multi = twitch.Multi({\r\n    connectors: [twitch.Chat, twitch.EventSub],\r\n    user {\r\n        name: \"<username>\",\r\n        id: \"<user id>\",\r\n        token: \"<oauth token>\"\r\n    },\r\n    channel: \"<channel>\",\r\n    topics: [\r\n        \"channel.follow\"\r\n    ]\r\n})\r\n\r\nmulti.on(\"chat.message\", console.log)\r\nmulti.on(\"channel.follow\", console.log)\r\n\r\n//  returns an array of connectors .connect() results\r\nawait multi.connect()\r\nawait multi.say(\"message\")\r\nawait multi.say(\"reply thread\", \"<msg id replied to>\")\r\nmulti.disconnect()\r\n```\r\n","readmeFilename":"README.md","gitHead":"237e11bc2c23eca95e02309660395fce3e494409","_id":"@axel669/twitch@1.1.0-beta.0","_nodeVersion":"16.18.0","_npmVersion":"8.5.3","dist":{"integrity":"sha512-rkBxtOwyxIYRqBl/JSKlc8zpNeUEgvezRp37Ymia0rAxlKWY3EEoThyvluqu/Qc6cbfw0wyXrUTZXLCeE020jw==","shasum":"c05649405ab9eb83addd7bbb92230aae19c91bf2","tarball":"https://registry.npmjs.org/@axel669/twitch/-/twitch-1.1.0-beta.0.tgz","fileCount":6,"unpackedSize":84386,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWDrdEKeaPE0UPykpV3xtxTakXMgW89nqTyYUBvpuPmAIhAJdG0pG00lDAB3J2skGBWTuicdsYgJH4zWGjrL7KdDYZ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhBDuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLmg//bRk27vzyFp2xPImxwrJ3T/Rm6tp4pRqSpgRBl3qhHdnc6UCZ\r\nkn/VfTu5hZeejfTHcK2xIoQ9a3GaQeYOaQa46Sd5hgI1Ve2TYIG4eDX3J4xu\r\nkYR8/xw7aV8YUBtcEvTlyCvV2utis2/Rig0JKtqAbJ+HeWF4n0UJUBZ7qR03\r\npTf8WIca3waeX/JFpQ4oraX3uyqRtSqsu0RjiB1LjqLnVk3Rhyb+HciNy2fV\r\naip6CcGbFMQw8eWWGXqptql9VZgUZK9MC+cg0GirhDM4QOSvUUUKEskwJBPa\r\nNb+82Vjbff3mXO4qRzQt+2CjH458AB7eL7G0OVVtHfKpvOOJfFukuJWpa7sx\r\n+/WA4jwI3YxcCLVxbxzs4sg8N4DjOrVHO2lG1ZxXRQr3sSVVMnxicS21WDXz\r\n1+RLIiQr1r15a5/BnIFcdD49N7LTnFRIOjQilTlo9xp9MoVWJ9GU7kfUJjWn\r\nmBr8TLHLrCP5As1ouzQy9wap+bFctOTpLlooNJlcIkU+iCtXOIzpnHizHGZI\r\nA6I8mRHKNErVz5KXsdZ8n01YXPJ/Z4WFnlBF3/n4/KZer2LO8uTqMc+G9yjE\r\ngvrf4R65mLBA8/uTGhVDyglVMneTUoZfQHkMod/AXD0agrd7YjQR+BBt4X7n\r\n/Wjnh49emaes49BHsB+K2AZGX6gJcbhRniw=\r\n=loCj\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitch_1.1.0-beta.0_1669599470194_0.23465899171407734"},"_hasShrinkwrap":false},"1.1.0":{"name":"@axel669/twitch","version":"1.1.0","description":"Simple library for doing things with twitch chat and pubsub thats made for the\r browser.","main":"node/index.mjs","scripts":{"build":"rollup -c build/rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"license":"MIT","bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"homepage":"https://github.com/axel669/twitch-chat#readme","devDependencies":{"@rollup/plugin-commonjs":"^21.0.2","@rollup/plugin-node-resolve":"^13.1.3","rollup":"^2.69.1"},"dependencies":{"@axel669/event-bridge":"^1.0.2","node-fetch":"^3.3.0","ws":"^8.8.0"},"exports":{"node":"./node/index.mjs","browser":"./browser/module.mjs"},"gitHead":"2e49446a1322b6e3bfd3435c38b158c595b490fe","_id":"@axel669/twitch@1.1.0","_nodeVersion":"18.12.1","_npmVersion":"8.5.3","dist":{"integrity":"sha512-hFvcAgAL4WC6XZhM9wU+kgpiSIJTUzhV/D1TdnQPs+z81A3JR4h/6pLqtnfcyjveT6HUFzOhaVj57of1Ioc81A==","shasum":"82de0f92833d6f5b5a609224533c190058b1eec8","tarball":"https://registry.npmjs.org/@axel669/twitch/-/twitch-1.1.0.tgz","fileCount":6,"unpackedSize":92928,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+NonmOT6mhIFdbJJZgNvZaB44tGG6LznYgjFdSFOOWAiA3rmfIw46l6LTpVw9G6SoJVbtP9lmhBx2VP52NuQiaUw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/EZAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7gA/+Mdz2hkuyfCgQqJ+KKtGbhfN7xNu/iKp4dH2RXpv3wf0ucGHG\r\nojJR7+V/Sx5/Eg5ny4wbwrlqX3fbBbhAiVISkYysiAxDFpJzelHvDhxkOyhv\r\nEPphq5X+81WSmnD5PFkLXkDSXM4B3EPm3LKE7TsEe/xyHUnxCErAaLwZ99sx\r\n23hGOg/QOk/6SrlGgrrYYUJJnIOAm4lDaaiAFObUzbkb13agbFizjWI/odA8\r\nroNQ5PT3/0FMksyotS+c2LlEgfhnlm7FC8p0PrxIvK4gfd1UvUHuMXOO9Dz1\r\n51G8ELmBDZEtLHJ/zcRwLmS2dxOOoBxMikpP2qVBNv7j2Gr+hEf+v0F1ycpe\r\n525s/j4/2XzhgTPkJNVo5gX9X7o2OHFG0tzkWBuEYiG3cex8XjQWtp+zBXVU\r\n80vmxdB+TNYoIpbdwW+wej+mO8MgA9vjM8NDpxvFqAsqWvzj9PgVl2ONxemN\r\nGOu56bivlIfd4iKz9CVq9UolnVnh09ZSK/lnI0tM2qKyhV3fZ+T6GGn+pCc7\r\nO3P2XEBTvUk6F0joYnccBNtjnbnPul+uyWVLX4xiJBW9zmhE5PD71fZJcEbh\r\nVVJpCkcpErE6mJOSXDwcLPAtMHYD4R+j9Bxcxnddvcpb4dgF+UOnrDP5JANw\r\nVw/5wIKTL417eDrlz/qFP6xnELXqf4EPnN4=\r\n=pb0b\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitch_1.1.0_1677477439926_0.3853379320592325"},"_hasShrinkwrap":false},"1.2.0":{"name":"@axel669/twitch","version":"1.2.0","description":"Simple library for doing things with twitch chat and pubsub thats made for the\r browser.","main":"node/index.mjs","scripts":{"build":"rollup -c build/rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"license":"MIT","bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"homepage":"https://github.com/axel669/twitch-chat#readme","devDependencies":{"@rollup/plugin-commonjs":"^21.0.2","@rollup/plugin-node-resolve":"^13.1.3","rollup":"^2.69.1"},"dependencies":{"@axel669/event-bridge":"^1.0.2","node-fetch":"^3.3.0","ws":"^8.8.0"},"exports":{"node":"./node/index.mjs","browser":"./browser/module.mjs"},"gitHead":"9e34ebe0219d5d0dfecdb99a58fdc0ca8b0b1aa8","_id":"@axel669/twitch@1.2.0","_nodeVersion":"18.12.1","_npmVersion":"8.5.3","dist":{"integrity":"sha512-u5A9+uX/wMBzlg/ZCLUQsAV4UZR1OSmKS9i2+PHwotvy+PEZ1ezkC0JKZShc01++yYvahsrpgImWIO9sgxFNlQ==","shasum":"e45d5ada809de1e720d01cf96bfb9718720db53a","tarball":"https://registry.npmjs.org/@axel669/twitch/-/twitch-1.2.0.tgz","fileCount":6,"unpackedSize":92913,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+1rMEj2wEYfIF3CZq+JeK6WdYXc+ng6D70XIpHNijTwIgG5QcMitTRK2s0BvIYSpB1Xv4n1rZ0SIecgjojQEx2lY="}]},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitch_1.2.0_1685423675164_0.35072878790646134"},"_hasShrinkwrap":false},"1.2.1":{"name":"@axel669/twitch","version":"1.2.1","description":"Simple library for doing things with twitch chat and pubsub thats made for the\r browser.","main":"node/index.mjs","scripts":{"build":"rollup -c build/rollup.config.js"},"repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"license":"MIT","bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"homepage":"https://github.com/axel669/twitch-chat#readme","devDependencies":{"@rollup/plugin-commonjs":"^21.0.2","@rollup/plugin-node-resolve":"^13.1.3","rollup":"^2.69.1"},"dependencies":{"@axel669/event-bridge":"^1.0.2","node-fetch":"^3.3.0","ws":"^8.8.0"},"exports":{"./node":"./node/index.mjs","./browser":"./browser/module.mjs"},"gitHead":"9e34ebe0219d5d0dfecdb99a58fdc0ca8b0b1aa8","_id":"@axel669/twitch@1.2.1","_nodeVersion":"18.16.0","_npmVersion":"8.5.3","dist":{"integrity":"sha512-4jVr6FjbPDVxg5Zh2+KMK5yCdVdur4NT8SAZ3YaeY6YWjPoU2YQ9XswlduZDamh5Z9wQAtM4ztClALkSrSLohw==","shasum":"7887a4850ada34bf1bc7fa0fde49ce3481300359","tarball":"https://registry.npmjs.org/@axel669/twitch/-/twitch-1.2.1.tgz","fileCount":6,"unpackedSize":92884,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyJSbXU18dwG0A4NLK84XFHXY2Irk51NPA2qGJ1TfWYAIgQ3unuipav1QVJTiPu8A8z2aC778wXPderCnsos3tdIw="}]},"_npmUser":{"name":"axel669","email":"axel@axel669.net"},"directories":{},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitch_1.2.1_1689308533978_0.44275096297492333"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-05T20:23:23.404Z","1.0.0-beta.0":"2022-03-05T20:23:23.644Z","modified":"2023-07-14T04:22:14.380Z","1.0.0-beta.1":"2022-03-06T03:49:50.457Z","1.0.0-beta.2":"2022-03-06T03:56:26.764Z","1.0.0":"2022-03-07T23:54:11.602Z","1.0.1":"2022-03-09T07:23:28.025Z","1.0.2":"2022-03-10T05:53:33.320Z","1.0.3":"2022-03-10T05:59:07.817Z","1.0.4":"2022-03-11T04:42:06.450Z","1.0.5":"2022-03-11T04:45:25.461Z","1.0.6":"2022-05-24T04:15:42.729Z","1.0.7":"2022-05-24T04:22:15.860Z","1.0.8":"2022-06-29T04:08:38.611Z","1.1.0-beta.0":"2022-11-28T01:37:50.332Z","1.1.0":"2023-02-27T05:57:20.104Z","1.2.0":"2023-05-30T05:14:35.363Z","1.2.1":"2023-07-14T04:22:14.231Z"},"maintainers":[{"name":"axel669","email":"axel@axel669.net"}],"homepage":"https://github.com/axel669/twitch-chat#readme","repository":{"type":"git","url":"git+https://github.com/axel669/twitch-chat.git"},"author":{"name":"Axel"},"bugs":{"url":"https://github.com/axel669/twitch-chat/issues"},"license":"MIT","readme":"# Axel669's Twitch Lib\r\n\r\nSimple library for doing things with twitch chat and pubsub thats made for the\r\nbrowser.\r\n\r\n## Installation\r\n\r\n### yarn/npm\r\n```\r\nnpm add @axel669/twitch\r\n```\r\n\r\n### Browser\r\n```html\r\n<script src=\"https://cdn.jsdelivr.net/npm/@axel669/twitch/browser/twitch.js\"></script>\r\n```\r\n\r\n## Usage\r\n\r\n### Client Side Bundled\r\n```js\r\nimport {Chat, EventSub, Multi} from \"@axel669/twitch/browser\"\r\n```\r\n\r\n### Require\r\nNo longer supported directly.\r\n\r\n### Import\r\n```js\r\nimport {Chat, EventSub, Multi} from \"@axel669/twitch\"\r\n//  also has a named /node export available if projects also use the browser\r\n//  import this can help avoid some confusion\r\nimport {Chat, EventSub, Multi} from \"@axel669/twitch/node\"\r\n```\r\n\r\n### Browser\r\n> If the cdn script tag is used\r\n```js\r\ntwitch.Chat(...)\r\ntwitch.EventSub(...)\r\ntwitch.Multi(...)\r\n```\r\n\r\n## Events\r\nLibrary uses [EventBridge](https://github.com/axel669/event-bridge) to\r\nmanage events, see there for more details about how listeners work. All of the\r\nobjects created pass the `on` functions from the internal bridge it uses.\r\n\r\n## Chat API\r\n```js\r\nimport {Chat} from \"@axel669/twitch\"\r\n\r\nconst chat = Chat({\r\n    user: {\r\n        name: \"<username>\",\r\n        token: \"<oauth token>\",\r\n    },\r\n    channel: \"<channel>\"\r\n})\r\n\r\nchat.on(\r\n    \"chat.*\",\r\n    ({ data }) => console.log(data.tags.displayName, data.message)\r\n)\r\nchat.on(\r\n    \"bits\",\r\n    ({ data }) => console.log(data.tags.displayName, \"gave\", data.tags.bits)\r\n)\r\nchat.on(\r\n    \"sub.*\",\r\n    ({ data }) => console.log(\"sub\", data)\r\n)\r\nawait chat.connect()\r\nawait chat.say(\"message\")\r\nawait chat.say(\"reply thread\", \"<msg id replied to>\")\r\nchat.disconnect()\r\n```\r\n\r\n### Chat Event List\r\n> This is a list of the events that are currently parsed and sorted through.\r\n> There are still some irc commands it doesn't parse (I didn't really see a\r\n> reason to, but I'm also lazy), and those can be captured with the `*` event.\r\n> Those events will always be full caps like the commands.\r\n- system - System messages that come through the socket (I got pretty lazy about\r\n    parsing these)\r\n- ping - Twitch sends a ping every few minutes, the library automatically sends\r\n    back the poing message expected to keep the connection alive, but you can\r\n    use this event to do something custom as well\r\n- chat.redeem - any *custom* redeem that has text attached to it\r\n- chat.message - any chat message that comes through that isn't a sub-based\r\n    event (including redeems that have a chat message attached)\r\n    **NOTE: highlighted message redeems come through here with the tag\r\n    `msgID` set to `\"highlighted-message\"`**\r\n- join/part - Sent when users are marked as joining or leaving a chat. These\r\n    are not guaranteed to happen immediately but could be used to keep track of\r\n    an approximate user list.\r\n- raid/unraid - Start or cancelled raids\r\n- sub.new - New subscription to the channel\r\n- sub.resub - Resubs\r\n- sub.gift - When someone is given a gift sub from a user\r\n- sub.gift.anon - Gift sub from anon user\r\n- sub.gift.mystery - This event is fired when someone gifts to the community.\r\n    The individual recipients will each get a `sub.gift` or `sub.gift.anon`.\r\n- sub.upgrade - User continues a gifted sub\r\n- sub.upgrade.anon - User continues a gift sub from an anon user\r\n\r\n## Pubsub API (deprecated)\r\n> This API is deprecated in favor of the EventSub API.\r\n\r\n```js\r\nconst pubsub = twitch.Pubsub({\r\n    user: {\r\n        id: \"<user id>\",\r\n        token: \"<oauth token>\"\r\n    },\r\n    topics: [\r\n        \"channel-points-channel-v1\"\r\n    ]\r\n})\r\npubsub.on(\r\n    \"channel-points-channel-v1\",\r\n    ({ data }) => console.log(data.redemption.reward.title)\r\n)\r\nawait pubsub.connect()\r\n//  some time later\r\npubsub.disconnect()\r\n```\r\n\r\n## EventSub API\r\n\r\n```js\r\nconst eventsub = twitch.EventSub({\r\n    user: {\r\n        id: \"<user id>\",\r\n        token: \"<oauth token>\"\r\n    },\r\n    clientID: \"lskadjfklsaf\",\r\n    topics: [\r\n        \"channel.follow\"\r\n    ]\r\n})\r\neventsub.on(\r\n    \"channel.follow\",\r\n    ({ data }) => console.log(`${data.user_name} followed!`)\r\n)\r\nawait eventsub.connect()\r\n//  some time later\r\neventsub.disconnect()\r\n```\r\n\r\n### EventSub Subscriptions\r\n`EventSub` connects to Twitch's beta EventSub Websocket. Topics are the exact\r\nsubscription topic that Twitch has listed for an event, and the events fired\r\nwill use the same name as the subscription topic.\r\n[Subscription Topics](https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types)\r\n\r\n### Event List\r\nThe `Pubsub` will fire events based on the topics passed into the object on\r\ncreation. it will fire an event with the type of the topic without any of the\r\nIDs attached. A full list of the pubsub topics and message data can be found\r\n[Here](https://dev.twitch.tv/docs/pubsub).\r\n\r\n## Multi API\r\nThe `Multi` function takes the `user`, `token`, and `topics` properties\r\nfrom the `Chat` and `EventSub` functions and instantiates both of them\r\ninternally. It fires events from both of them, and its `connect` and\r\n`disconnect` functions trigger for both internal objects. It also passes the\r\n`say` function from the `Chat` object.\r\n\r\nMight add other connectors in the future.\r\n\r\n```js\r\nconst multi = twitch.Multi({\r\n    connectors: [twitch.Chat, twitch.EventSub],\r\n    user {\r\n        name: \"<username>\",\r\n        id: \"<user id>\",\r\n        token: \"<oauth token>\"\r\n    },\r\n    channel: \"<channel>\",\r\n    topics: [\r\n        \"channel.follow\"\r\n    ]\r\n})\r\n\r\nmulti.on(\"chat.message\", console.log)\r\nmulti.on(\"channel.follow\", console.log)\r\n\r\n//  returns an array of connectors .connect() results\r\nawait multi.connect()\r\nawait multi.say(\"message\")\r\nawait multi.say(\"reply thread\", \"<msg id replied to>\")\r\nmulti.disconnect()\r\n```\r\n","readmeFilename":"README.md","description":"Simple library for doing things with twitch chat and pubsub thats made for the\r browser."}