@rinq/websocket
Version:
Rinq in the browser.
10 lines (7 loc) • 383 B
JavaScript
module.exports = function unmarshalCallAsyncError (header) {
var namespace = header[0]
var command = header[1]
if (typeof namespace !== 'string') throw new Error('Invalid CALL_ASYNC_ERROR message header (namespace).')
if (typeof command !== 'string') throw new Error('Invalid CALL_ASYNC_ERROR message header (command).')
return {namespace: namespace, command: command}
}