@xmpp/middleware
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/xmpp__middleware package

0.13.3 • Public • Published

middleware

Middleware for @xmpp/client and @xmpp/component.

Supports Node.js and browsers.

Install

npm install @xmpp/middleware

Usage

const { Client } = require("@xmpp/client");
const middleware = require("@xmpp/middlware");

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) => {});

/@xmpp/middleware/

    Package Sidebar

    Install

    npm i @xmpp/middleware

    Weekly Downloads

    4,349

    Version

    0.13.3

    License

    ISC

    Unpacked Size

    13 kB

    Total Files

    12

    Last publish

    Collaborators

    • sonny