GlucoseIQ

Connectors

Dexcom, Libre, and Nightscout normalization, capabilities, and safe variants.

13 functions

Generated from the source TSDoc — every signature, parameter, and example is the real thing.

normalizeDexcomEntries

normalizeDexcomEntries(entries: DexcomShareEntry[]): NormalizedCGMReading[]

Converts an array of Dexcom Share entries into NormalizedCGMReadings.

ParameterDescription
entriesRaw Dexcom Share entries from any Dexcom client library

Returns — Array of normalized readings, sorted chronologically


normalizeDexcomEntry

normalizeDexcomEntry(entry: DexcomShareEntry): NormalizedCGMReading

Converts a single Dexcom Share entry into a NormalizedCGMReading.

ParameterDescription
entryRaw 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 & { … }): CGMTrend

Normalizes a Dexcom Share trend string into a canonical CGMTrend.


normalizeLibreEntries

normalizeLibreEntries(entries: LibreLinkUpEntry[]): NormalizedCGMReading[]

Converts an array of Libre LinkUp entries into NormalizedCGMReadings.

ParameterDescription
entriesRaw Libre LinkUp entries from any Libre client library

Returns — Array of normalized readings, sorted chronologically


normalizeLibreEntry

normalizeLibreEntry(entry: LibreLinkUpEntry): NormalizedCGMReading

Converts a single Libre LinkUp entry into a NormalizedCGMReading.

ParameterDescription
entryRaw 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): CGMTrend

Normalizes 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): CGMTrend

Normalizes a Nightscout direction string into a canonical CGMTrend.


normalizeNightscoutEntries

normalizeNightscoutEntries(entries: NightscoutEntry[]): NormalizedCGMReading[]

Converts an array of Nightscout SGV entries into NormalizedCGMReadings.

ParameterDescription
entriesRaw Nightscout entries from the /api/v1/entries endpoint

Returns — Array of normalized readings, sorted chronologically


normalizeNightscoutEntry

normalizeNightscoutEntry(entry: NightscoutEntry): NormalizedCGMReading

Converts a single Nightscout SGV entry into a NormalizedCGMReading.

ParameterDescription
entryRaw Nightscout SGV entry

Returns — Normalized reading compatible with all @glucoseiq/core analytics functions


parseDexcomDate

parseDexcomDate(raw: string): string

Parses 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[]): SafeNormalizeResult

Safe (partial-success) variant of normalizeDexcomEntries.


safeNormalizeLibreEntries

safeNormalizeLibreEntries(entries: LibreLinkUpEntry[]): SafeNormalizeResult

Safe (partial-success) variant of normalizeLibreEntries.


safeNormalizeNightscoutEntries

safeNormalizeNightscoutEntries(entries: NightscoutEntry[]): SafeNormalizeResult

Safe (partial-success) variant of normalizeNightscoutEntries.

On this page