Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.

web


web / lib/jobs/utils/event-processing

lib/jobs/utils/event-processing

Provides utility functions for processing and normalizing raw row data into a structured event format.

This module is responsible for the transformation of a single row from an imported file into a clean, structured object that can be used for event creation. Its key functions include:

  • Extracting and validating geographic coordinates from various possible column formats.
  • Normalizing and cleaning standard event fields like title, date, and description.
  • Parsing tags from the row data.

Functions

extractCoordinatesFromRow()

extractCoordinatesFromRow(row, columnMapping): object

Parameters

row

Record<string, unknown>

columnMapping
latitudeColumn?

string

longitudeColumn?

string

combinedColumn?

string

coordinateFormat?

string

Returns

object

coordinates?

optional coordinates: object

coordinates.lat

lat: number

coordinates.lng

lng: number

validation?

optional validation: Record<string, unknown>


processRowData()

processRowData(row, hasCoordinates, columnMapping): Record<string, unknown>

Parameters

row

Record<string, unknown>

hasCoordinates

boolean

columnMapping

undefined | Record<string, unknown>

Returns

Record<string, unknown>

Last updated on