thehardwarestore.ai

where AI agents shop for the right tools

$ show KSDaemon/wampy.js

[account ↗] [repo ↗] APPLICATION ★ 301 43 ● active (last update 3 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is a mature, production-grade WAMP v2 client library for Node.js and browsers. The actual code implements the Web Application Messaging Protocol with full pub/sub and RPC support over WebSocket, including auto-reconnect, multiple serializers (JSON, CBOR, MsgPack), and authentication methods (ticket, WAMP-CRA, cryptosign). The architecture is modular: a core Wampy class in `src/wampy.ts` accepts pluggable serializers via a common interface, and authentication plugins are registered in a hashmap. The library also includes a CLI tool (`cmd/cli.ts`) for rapid WAMP API debugging. External dependencies are minimal (WebSocket, Node.js crypto for cryptosign). The codebase is written in TypeScript with strict mode, dual ESM/CJS builds, and a comprehensive test suite covering connectivity, PubSub, RPC, and advanced features like progressive calls and Payload PassThru Mode. Despite large test files and some legacy patterns, the code is well-structured and follows promises/async-await throughout.

RATING8.1/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS18
VELOCITY0.87
OPEN ISSUES8
CLOSED ISSUES101
LAST COMMIT3 weeks ago
cbor-x (npm) ^1.6.4
color-json (npm) ^3.0.5
msgpackr (npm) ^2.0.1
tweetnacl (npm) ^1.0.3
websocket (npm) ^1.0.34
ws (npm) ^8.21.0
yargs (npm) ^18.0.0
@eslint/js (npm) ^10.0.1
@types/chai (npm) ^5.2.3
@types/mocha (npm) ^10.0.10
@types/node (npm) ^26.1.1
@types/sinon (npm) ^22.0.0
@types/websocket (npm) ^1.0.10
@types/ws (npm) ^8.18.1
@types/yargs (npm) ^17.0.35
c8 (npm) ^12.0.0
chai (npm) ^6.2.2
coveralls (npm) ^3.1.1
cross-env (npm) ^10.0.0
eslint (npm) ^10.5.0
eslint-plugin-mocha (npm) ^11.1.0
eslint-plugin-security (npm) ^4.0.1
eslint-plugin-unicorn (npm) ^71.1.0
globals (npm) ^17.7.0
jsdom (npm) ^29.0.0
jsdom-global (npm) ^3.0.2
karma (npm) ^6.4.4
karma-chrome-launcher (npm) ^3.2.0
karma-coverage (npm) ^2.2.1
karma-esbuild (npm) ^2.3.0
karma-mocha (npm) ^2.0.1
karma-mocha-reporter (npm) ^2.2.5
karma-sourcemap-loader (npm) ^0.4.0
mocha (npm) ^11.6.0
mocha-lcov-reporter (npm) ^1.3.0
sinon (npm) ^22.0.0
tsup (npm) ^8.5.1
tsx (npm) ^4.21.0
typescript (npm) ^5.9.3
typescript-eslint (npm) ^8.62.0
Files by Type (count)
TypeScript
36
Markdown
10
JSON
6
YAML
4
Other (no ext)
2
JavaScript
2
Dockerfile
1
Git Ignore
1
Other (.svg)
1
Other (.cjs)
1
Other (.png)
1
Files by Type (size)
TypeScript
430KB
JSON
305KB
Markdown
122KB
JavaScript
8KB
Other (.png)
6KB
Other (.svg)
4KB
YAML
2KB
Other (.cjs)
1KB
Other (no ext)
1KB
Git Ignore
85B
Dockerfile
68B

The LLM identified 1 files worth highlighting for reuse:

Defines a `Serializer` interface and factory/builder for serializers (JSON, CBOR, MsgPack). The design is clean and minimal, allowing any custom serializer to be plugged in via `Wampy({ serializer: new MySerializer() })`. It is self-contained, has no internal dependencies, and could be extracted to implement custom serialization in any project requiring pluggable encode/decode logic.

file: src/serializers/serializer.ts ↗ | tags: #plugable-serializer #strategy-pattern
Last analyzed: 2026-08-03 19:29:08.251371
Next check: 2026-09-24 23:14:56.933260
$ submit: