XMPP URIs for JavaScript
Only parsing is supported at the moment.
npm install @xmpp/uri
import { parse } from "@xmpp/uri";
parse('xmpp://[email protected]/[email protected]/truc?message;subject=Hello%20World');
{
authority: jid('[email protected]'), // see https://github.com/xmppjs/xmpp.js/tree/main/packages/jid
path: jid('[email protected]/truc'), // see https://github.com/xmppjs/xmpp.js/tree/main/packages/jid
query: {
type: 'message',
params: {
subject: 'Hello World',
},
},
}