@xmpp/middleware
v0.14.0
Published
XMPP middleware for JavaScript
Readme
middleware
Middleware for @xmpp/client and @xmpp/component.
Supports Node.js and browsers.
Install
npm install @xmpp/middlewareUsage
import { Client } from "@xmpp/client";
import middleware from "@xmpp/middleware";
const client = new Client();
const app = middleware({ entity: client });use
The use method registers a middleware for incoming stanzas.
app.use((ctx, next) => {});filter
The filter method registers a middleware for outgoing stanzas.
app.filter((ctx, next) => {});