@xmpp-infister/middleware

0.9.3 • Public • Published

middleware

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

Supports Node.js and browsers.

Install

npm install @xmpp-infister/middleware

Usage

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

Readme

Keywords

Package Sidebar

Install

npm i @xmpp-infister/middleware

Weekly Downloads

0

Version

0.9.3

License

ISC

Unpacked Size

12.7 kB

Total Files

12

Last publish

Collaborators

  • infister