npm.io
0.9.3 • Published 6 years ago

@xmpp-infister/error

Licence
ISC
Version
0.9.3
Deps
0
Size
2 kB
Vulns
0
Weekly
0

error

XMPP error abstraction for JavaScript.

Install

npm install @xmpp-infister/error or yarn add @xmpp-infister/error

Usage

const XMPPError = require('@xmpp-infister/error')

const error = new XMPPError('service-unavailable', 'optional text', element)
error instanceof Error // true
error.condition === 'service-unavailable' // true
error.text === 'service-unavailabe - optional text' // true
error.element === element // true

Keywords