Package Exports
- @xmpp/middleware
- @xmpp/middleware/index.js
- @xmpp/middleware/lib/StanzaError
- @xmpp/middleware/lib/StanzaError.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@xmpp/middleware) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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) => {});