Skip to main content

Function: normalizeMonitor()

normalizeMonitor(monitor: Partial<Monitor>): Monitor

Defined in: src/stores/sites/utils/monitorOperations.ts:882

Normalizes a partial monitor object into a complete Monitor instance.

Parametersโ€‹

monitorโ€‹

Partial<Monitor>

Partial monitor data to normalize

Returnsโ€‹

Monitor

Complete Monitor object with validated and normalized data

Remarksโ€‹

This function takes a partial monitor configuration and ensures it has all required fields with appropriate defaults, validates the data types, and filters fields based on monitor type.

Throwsโ€‹

TypeError if monitor data is invalid or malformed