# stanza-extend

> Modern XMPP in the browser, with a JSON API

Latest version **12.17.11** (published 2021-09-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install stanza-extend
pnpm add stanza-extend
yarn add stanza-extend
bun add stanza-extend
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 12.17.11 |
| Published | 2021-09-30 |
| First published | 2021-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 16 |
| Unpacked size | 1.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1242 |
| Author | Lance Stout |
| Maintainers | yoryky |
| Keywords | jingle, stanza, stanza.io, xmpp |

## Links

- npm: https://www.npmjs.com/package/stanza-extend
- Repository: https://github.com/legastero/stanza
- Homepage: https://stanzajs.org
- Issues: https://github.com/legastero/stanza/issues
- npm.io page: https://npm.io/package/stanza-extend

## Dependencies (16)

- [ws](https://npm.io/package/ws.md) ^7.4.4
- [sdp](https://npm.io/package/sdp.md) ^3.0.2
- [async](https://npm.io/package/async.md) ^3.0.1
- [tslib](https://npm.io/package/tslib.md) ^2.2.0
- [buffer](https://npm.io/package/buffer.md) ^6.0.3
- [process](https://npm.io/package/process.md) ^0.11.10
- [punycode](https://npm.io/package/punycode.md) ^2.1.1
- [@types/ws](https://npm.io/package/@types/ws.md) ^7.4.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1
- [@types/node](https://npm.io/package/@types/node.md) ^14.14.36
- [@types/async](https://npm.io/package/@types/async.md) ^3.2.5
- [stanza-shims](https://npm.io/package/stanza-shims.md) ^1.1.1
- [@types/punycode](https://npm.io/package/@types/punycode.md) ^2.1.0
- [readable-stream](https://npm.io/package/readable-stream.md) ^2.3.6
- [@types/readable-stream](https://npm.io/package/@types/readable-stream.md) ^2.3.9
- [react-native-randombytes](https://npm.io/package/react-native-randombytes.md) ^3.6.0

## Recent versions

- 12.17.11 (latest) — 2021-09-30
- 12.17.10 — 2021-09-24
- 12.17.9 — 2021-08-18
- 12.17.8 — 2021-07-05
- 12.17.7 — 2021-06-01
- 12.17.6 — 2021-06-01
- 12.17.5 — 2021-05-28
- 12.17.4 — 2021-05-27
- 12.17.2 — 2021-05-20
- 12.17.1 — 2021-05-13

## README

# StanzaJS

**Modern XMPP, with a JSON API.**

<hr />
<p>
<a href="https://npmjs.org/package/stanza"><img src="https://img.shields.io/npm/v/stanza.svg?style=flat" alt="npm" /></a>
<a href="https://stanzajs.org/discuss/logs/"><img src="https://img.shields.io/badge/endpoint.svg?url=https://stanzajs.org/discuss/badge.json&style=flat" alt="chat" /></a>
</p>

## What is this?

StanzaJS is a JavaScript/TypeScript library for using modern XMPP, and it does that by exposing everything as JSON. Unless you insist, you have no need to ever see or touch any XML when using StanzaJS.

## Installing

```sh
npm install stanza
```

## Echo Client Demo

```javascript
import * as XMPP from 'stanza';

const client = XMPP.createClient({
    jid: 'echobot@example.com',
    password: 'hunter2',

    // If you have a .well-known/host-meta.json file for your
    // domain, the connection transport config can be skipped.
    transports: {
        websocket: 'wss://example.com:5281/xmpp-websocket',
        bosh: 'https://example.com:5281/http-bind'
    }
});

client.on('session:started', () => {
    client.getRoster();
    client.sendPresence();
});

client.on('chat', msg => {
    client.sendMessage({
        to: msg.from,
        body: 'You sent: ' + msg.body
    });
});

client.connect();
```

## Documentation

-   API Reference
    -   [Configuring](docs/Configuring.md)
    -   [Events](docs/Events.md)
    -   [Client Methods](docs/Reference.md)
-   [JXT: JSON/XML Translation](docs/jxt/README.md)
    -   [Working with Languages](docs/jxt/Language.md)
    -   [Field Definition Types](docs/jxt/FieldTypes.md)
-   [Supported XEP Formats](docs/Supported_XEP_Formats.md)
-   [Creating Plugins](docs/Create_Plugin.md)
-   [Using with React Native](docs/React_Native.md)
-   [Using PubSub](docs/Using_PubSub.md)
-   [Using Stream Management](docs/Using_Stream_Management.md)

## Discussion

MUC Room: [discuss@stanzajs.org](https://stanzajs.org/discuss/logs) / [Logs](https://stanzajs.org/discuss/logs)

## Related Modules

These are related modules that form part of StanzaJS:

| Name                                                   | Description                                                          | Source                                              |
| ------------------------------------------------------ | -------------------------------------------------------------------- | --------------------------------------------------- |
| [stanza-shims](https://npmjs.org/package/stanza-shims) | Runtime shims used by StanzaJS for node, browsers, and React Native. | [Source](https://github.com/legastero/stanza-shims) |

## Recommended Modules

These are some additional modules that are highly recommended for use with StanzaJS:

| Name                                                       | Description                                                                      | Source                                           |
| ---------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------ |
| [staydown](https://npmjs.org/package/staydown)             | Render helper that keeps an element scrolled to the bottom based on user intent. | [Source](https://github.com/fritzy/staydown)     |
| [webrtc-adapter](https://npmjs.org/package/webrtc-adapter) | Shims browsers to provide a consistent WebRTC API.                               | [Source](https://github.com/webrtchacks/adapter) |

## License

[MIT](./LICENSE.md)

Portions of StanzaJS are derived from prior works. [See NOTICE file for details.](./NOTICE.md)

## Created By

If you like this, follow [@lancestout](http://twitter.com/lancestout) on Twitter.

---
_Source: https://npm.io/package/stanza-extend · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
