utils for modeling sgv (aka cgm readings) in node js