{"library":"nanosocket","type":"library","category":null,"description":"A tiny WebSocket client (~1KB bundled) with built-in reconnection and exponential backoff, offering callback/promise/stream-based message handling via emitterify. Version 1.1.0 is the current stable release. It is a lightweight alternative to heavier WebSocket libraries, focusing on minimal overhead and reconnection handling. The library works in browser and Node.js environments, but requires emitterify for stream/callback functionality.","language":"javascript","status":"active","version":"1.1.0","tags":["javascript","websocket","client"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install nanosocket","imports":["import nanosocket from 'nanosocket'","import nanosocket from 'nanosocket'\nconst socket = nanosocket('wss://example.com')\nsocket.send('msg').then(...)\nsocket.on('recv').map(d => ...)","import type nanosocket from 'nanosocket'  (if using with TypeScript)"]},{"cmd":"yarn add nanosocket","imports":[]},{"cmd":"pnpm add nanosocket","imports":[]}],"homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"nanosocket","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}