How to use the @xmpp/connection/lib/util.parseURI function in @xmpp/connection

To help you get started, we’ve selected a few @xmpp/connection examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xmppjs / xmpp.js / packages / tls / lib / Connection.js View on Github external
socketParameters(service) {
    const {port, hostname, protocol} = parseURI(service)
    return protocol === 'xmpps:'
      ? {port: Number(port) || 5223, host: hostname}
      : undefined
  }
}
github xmppjs / xmpp.js / packages / connection-tcp / index.js View on Github external
socketParameters(service) {
    const {port, hostname, protocol} = parseURI(service)

    return protocol === 'xmpp:'
      ? {port: port ? Number(port) : null, host: hostname}
      : undefined
  }

@xmpp/connection

XMPP connection for JavaScript

ISC
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis