normalizeFitIpcPayloadToBuffer
FitFileViewer - API Documentation v30.0.1
FitFileViewer - API Documentation / main/ipc/fitIpcPayload / normalizeFitIpcPayloadToBuffer
Function: normalizeFitIpcPayloadToBuffer()
normalizeFitIpcPayloadToBuffer(
value:unknown):NodeBuffer
Defined in: main/ipc/fitIpcPayload.ts:49
Normalizes renderer-provided FIT IPC payloads into a Node Buffer.
Electron usually transports FIT file bytes as ArrayBuffer. Supporting ArrayBufferView keeps the boundary robust if a caller sends a typed view, while still rejecting unrelated shapes before they reach the decoder.
Parametersβ
valueβ
unknown
Returnsβ
NodeBuffer
Throwsβ
TypeError when the payload is not an ArrayBuffer or ArrayBufferView.
Throwsβ
Error when the payload exceeds the FIT IPC payload cap.