Skip to content

Latest commit

 

History

History

uri

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

URI

XMPP URIs for JavaScript

Only parsing is supported at the moment.

Install

npm install @xmpp/uri

Usage

import { parse } from "@xmpp/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',
    },
  },
}

References