Some basic data modeling utilities for SGV
:
sensor glucose values.
This module allows easily converting sgv records to and from plain text (csv, tsv) and json.
Exposes streaming and synchronous interfaces for parsing and formatting sgv records and text and json records.
Use in your project by including it from npm like so:
$ npm install --save sgvdata
Serum glucose value:
- dateString - ISO8601
- date - unix epoch
- direction
- sgv
- device
Synchronous functions to manipulate a single record.
Handle text formats: csv, tsv.
Format a single json record as csv or tsv.
Parse a single textual record (csv or tsv) as a json record.
Synchronous functions for handling json records.
Synchronously return linted json record.
Quick wrapper utility around es.map
to turn a synchronous function into a
stream.
Format all json elements in stream, emitting new elements formatted as text.
Parse all text elements in stream, emitting new json objects.
Echo all sgv elements in stream, optionally throwing errors.
strict
- true - throw errors on invalid elements
EG: { strict: true }