Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 983 Bytes

README.md

File metadata and controls

37 lines (27 loc) · 983 Bytes

URI

XMPP URIs for JavaScript

Only parsing is supported at the moment.

Install

npm install @xmpp/uri

Usage

const URI = require('@xmpp/uri')

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',
    },
  },
}

References