{"_id":"@async-util/websocket","_rev":"1-1a5e40260455062d23cae846ea430168","name":"@async-util/websocket","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@async-util/websocket","version":"0.1.0","description":"A super lightweight lib to get websocket events in async style.","main":"index.mjs","types":"index.d.mts","directories":{"example":"example"},"repository":{"type":"git","url":"git+https://github.com/async-util/websocket.git"},"keywords":["async","websocket"],"author":{"name":"Tal","url":"talrasha007@gmail.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/async-util/websocket/issues"},"homepage":"https://github.com/async-util/websocket#readme","gitHead":"3d088a354f305a7dc18fc9a91e0c059ee751ac28","_id":"@async-util/websocket@0.1.0","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-Qi82wSkTm9S6qwhoL5yhZA1HzcONS5CDb9pVs4qLY64N+iKeelWxYuFilOL/u/0LkOSX364G7kstDmutEoJ8rw==","shasum":"39889276bd3bd65ab89dce47cd31a065169ebd54","tarball":"https://registry.npmjs.org/@async-util/websocket/-/websocket-0.1.0.tgz","fileCount":5,"unpackedSize":13396,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICqEGAOaHgEVmfn+tJOf91W8BrviX3VOX+OKoQJ2OE/6AiEA7RwKmn7aCokoQfNJ+NYAqqg2zSB9lVShOkZzTi2wuDo="}]},"_npmUser":{"name":"talrasha007","email":"talrasha007@gmail.com"},"maintainers":[{"name":"talrasha007","email":"talrasha007@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/websocket_0.1.0_1692500114035_0.13732052369161085"},"_hasShrinkwrap":false},"0.2.0":{"name":"@async-util/websocket","version":"0.2.0","description":"A super lightweight lib to get websocket events in async style.","main":"index.mjs","types":"index.d.mts","directories":{"example":"example"},"repository":{"type":"git","url":"git+https://github.com/async-util/websocket.git"},"keywords":["async","websocket"],"author":{"name":"Tal","url":"talrasha007@gmail.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/async-util/websocket/issues"},"homepage":"https://github.com/async-util/websocket#readme","gitHead":"8b1049e66d5046afc344413b07ccd584758f11a1","_id":"@async-util/websocket@0.2.0","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-XfdWGy7Gz/jwuwkqnOGpH6Svh4WuSqXlBcMfhcpnBth84IODcn4bZTTaguxV7OB2HIdi4a6icQcbFSTaqSZGCA==","shasum":"402e7a9744ce5ceb28255107f3118b451ec9850b","tarball":"https://registry.npmjs.org/@async-util/websocket/-/websocket-0.2.0.tgz","fileCount":5,"unpackedSize":13391,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHiqgfe4WrboM0baE8/PrJmVR8oVSEWj6XGWAKFx1yc2AiEAiy3Nulbfjl8mZerWhD675T/gvcVT/StGt6LUV29r5ME="}]},"_npmUser":{"name":"talrasha007","email":"talrasha007@gmail.com"},"maintainers":[{"name":"talrasha007","email":"talrasha007@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/websocket_0.2.0_1692525453986_0.0889578145987977"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-20T02:55:13.930Z","0.1.0":"2023-08-20T02:55:14.231Z","modified":"2023-08-20T09:57:34.444Z","0.2.0":"2023-08-20T09:57:34.180Z"},"maintainers":[{"name":"talrasha007","email":"talrasha007@gmail.com"}],"description":"A super lightweight lib to get websocket events in async style.","homepage":"https://github.com/async-util/websocket#readme","keywords":["async","websocket"],"repository":{"type":"git","url":"git+https://github.com/async-util/websocket.git"},"author":{"name":"Tal","url":"talrasha007@gmail.com"},"bugs":{"url":"https://github.com/async-util/websocket/issues"},"license":"Apache-2.0","readme":"# @async-util/websocket\nA super lightweight lib to get websocket events in async style.\n\n## Read data from websocket.\n```js\nimport { getWsData } from '@async-util/websocket';\n\n(async function () {\n  const ws = new WebSocket('wss://gateway.discord.gg/?v=9&encoding=json');\n  setTimeout(() => ws.send('{\"op\":1,\"d\":6}'), 1000);\n  setTimeout(() => ws.close(), 5000);\n\n  for await (const data of getWsData(ws)) {\n    console.log(data);\n  }\n\n  console.log('socket closed.');\n})(console.error);\n```","readmeFilename":"README.md"}