deepstream-message-rewriter
This repo creates a rewriter that can rewrite all messages received from an
upstream deepstream server. It serves a purpose in preserving message
invariants, such as data received from upstream never being undefined
, null
or similar. It can also serve a purpose in debugging and logging messages by
injecting arbitrary functions into the message receiving process, allowing
inspection of every single message sent to the client.
Basic Usage
There is a default export that can be directly plugged into the briteback deepstream client
import messageRewriter from '@briteback/deepstream-message-rewriter'
const deepstreamClientOptions = {
...
messageRewriter: messageRewriter,
...
};