XMPP URIs for JavaScript
Only parsing is supported at the moment.
npm install @xmpp/uri
const URI = require('@xmpp/uri')
URI.parse('xmpp://guest@example.com/support@example.com/truc?message;subject=Hello%20World')
{
authority: jid('guest@example.com'), // see https://github.com/xmppjs/xmpp.js/tree/main/packages/jid
path: jid('support@example.com/truc'), // see https://github.com/xmppjs/xmpp.js/tree/main/packages/jid
query: {
type: 'message',
params: {
subject: 'Hello World',
},
},
}