Formats used to serialize and deserialize SocketCluster messages. This package provides simple encode/decode functions for SocketCluster's internal message protocol. Current stable version is 4.0.0, released as part of the SocketCluster ecosystem. It is tightly coupled with SocketCluster and should not be used standalone. Release cadence follows SocketCluster's major updates. Key differentiator: designed specifically for SocketCluster's message format, not a general-purpose serializer.
npm install sc-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to serialize and deserialize a SocketCluster message using format and parse functions.
Use ESM imports (import { format } from 'sc-formatter'). If you must use CommonJS, stay on v3.Update code expecting Buffer to use Uint8Array or use Buffer.from() for compatibility.
Wrap parse() in try/catch or validate input format beforehand.
Use named imports: import { format, parse } from 'sc-formatter'.Change to ESM import or downgrade to v3.
Use named imports: import { format } from 'sc-formatter'.Use sc-formatter's parse() method, not JSON.parse.
No dependency data recorded yet.