Connectors
Dexcom, Libre, and Nightscout normalization, capabilities, and safe variants.
13 functions
normalizeDexcomEntries
normalizeDexcomEntries(entries: DexcomShareEntry[]): NormalizedCGMReading[]Converts an array of Dexcom Share entries into NormalizedCGMReadings.
| Parameter | Description |
|---|---|
entries | Raw Dexcom Share entries from any Dexcom client library |
Returns — Array of normalized readings, sorted chronologically
normalizeDexcomEntry
normalizeDexcomEntry(entry: DexcomShareEntry): NormalizedCGMReadingConverts a single Dexcom Share entry into a NormalizedCGMReading.
| Parameter | Description |
|---|---|
entry | Raw Dexcom Share entry |
Returns — Normalized reading compatible with all @glucoseiq/core analytics functions
Throws — If the date string cannot be parsed
normalizeDexcomTrend
normalizeDexcomTrend(trend: undefined | null | DexcomTrendString | string & { … }): CGMTrendNormalizes a Dexcom Share trend string into a canonical CGMTrend.
normalizeLibreEntries
normalizeLibreEntries(entries: LibreLinkUpEntry[]): NormalizedCGMReading[]Converts an array of Libre LinkUp entries into NormalizedCGMReadings.
| Parameter | Description |
|---|---|
entries | Raw Libre LinkUp entries from any Libre client library |
Returns — Array of normalized readings, sorted chronologically
normalizeLibreEntry
normalizeLibreEntry(entry: LibreLinkUpEntry): NormalizedCGMReadingConverts a single Libre LinkUp entry into a NormalizedCGMReading.
| Parameter | Description |
|---|---|
entry | Raw Libre LinkUp entry |
Returns — Normalized reading compatible with all @glucoseiq/core analytics functions
Throws — If the timestamp cannot be parsed
normalizeLibreTrend
normalizeLibreTrend(trend: undefined | null | number): CGMTrendNormalizes a Libre LinkUp numeric trend value into a canonical CGMTrend.
Accepts the raw API value (which may be null/undefined or out of range) and returns 'unknown' for any invalid or unmapped values.
normalizeNightscoutDirection
normalizeNightscoutDirection(direction: undefined | NightscoutDirection): CGMTrendNormalizes a Nightscout direction string into a canonical CGMTrend.
normalizeNightscoutEntries
normalizeNightscoutEntries(entries: NightscoutEntry[]): NormalizedCGMReading[]Converts an array of Nightscout SGV entries into NormalizedCGMReadings.
| Parameter | Description |
|---|---|
entries | Raw Nightscout entries from the /api/v1/entries endpoint |
Returns — Array of normalized readings, sorted chronologically
normalizeNightscoutEntry
normalizeNightscoutEntry(entry: NightscoutEntry): NormalizedCGMReadingConverts a single Nightscout SGV entry into a NormalizedCGMReading.
| Parameter | Description |
|---|---|
entry | Raw Nightscout SGV entry |
Returns — Normalized reading compatible with all @glucoseiq/core analytics functions
parseDexcomDate
parseDexcomDate(raw: string): stringParses a Dexcom date string into an ISO 8601 string.
Dexcom Share returns dates in the format "Date(epochMs)" or
"/Date(epochMs)/". This helper handles both, plus plain ISO strings.
safeNormalizeDexcomEntries
safeNormalizeDexcomEntries(entries: DexcomShareEntry[]): SafeNormalizeResultSafe (partial-success) variant of normalizeDexcomEntries.
safeNormalizeLibreEntries
safeNormalizeLibreEntries(entries: LibreLinkUpEntry[]): SafeNormalizeResultSafe (partial-success) variant of normalizeLibreEntries.
safeNormalizeNightscoutEntries
safeNormalizeNightscoutEntries(entries: NightscoutEntry[]): SafeNormalizeResultSafe (partial-success) variant of normalizeNightscoutEntries.