How to use the @xmpp/base64.decode function in @xmpp/base64

To help you get started, we’ve selected a few @xmpp/base64 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 / sasl / index.js View on Github external
const handler = element => {
      if (element.attrs.xmlns !== NS) {
        return
      }

      if (element.name === 'challenge') {
        mech.challenge(decode(element.text()))
        const resp = mech.response(creds)
        entity.send(
          xml(
            'response',
            {xmlns: NS, mechanism: mech.name},
            typeof resp === 'string' ? encode(resp) : ''
          )
        )
        return
      }

      if (element.name === 'failure') {
        reject(SASLError.fromElement(element))
      } else if (element.name === 'success') {
        resolve()
      }

@xmpp/base64

base64 for JavaScript

ISC
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis

Popular @xmpp/base64 functions