@hallparty/xmpp-middleware

0.12.0 • Public • Published

middleware

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

Supports Node.js and browsers.

Install

npm install @hallparty/xmpp-middleware

Usage

const { Client } = require("@hallparty/xmpp-client");
const middleware = require("@hallparty/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) => {});

Dependencies (4)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @hallparty/xmpp-middleware

    Weekly Downloads

    1

    Version

    0.12.0

    License

    ISC

    Unpacked Size

    12.4 kB

    Total Files

    11

    Last publish

    Collaborators

    • hallparty