Skip to main content
Version: v0.0.3

Function: status()

status(message): StatusBody | undefined

Convenience accessor: the <Status> (positive-acknowledgment) body of a message, or undefined.

Parameters

message

ScriptMessage

A parsed ScriptMessage.

Returns

StatusBody | undefined

The Status body, or undefined when the message is not a Status.

Example

status(parseScript(xml))?.code;