Comparing version 1.6.5 to 1.6.6
@@ -152,2 +152,9 @@ "use strict"; | ||
}); | ||
// Sorting the dates: | ||
const sortedDates = Object.keys(dailyMetrics[siteCode].dailyValues).sort(); | ||
const sortedDailyValues = {}; | ||
sortedDates.forEach(date => { | ||
sortedDailyValues[date] = dailyMetrics[siteCode].dailyValues[date]; | ||
}); | ||
dailyMetrics[siteCode].dailyValues = sortedDailyValues; | ||
}); | ||
@@ -215,2 +222,8 @@ return dailyMetrics; | ||
}); | ||
const sortedDateTimes = Object.keys(instantaneousMetrics[siteCode].instantaneousValues).sort(); | ||
const sortedInstantaneousValues = {}; | ||
sortedDateTimes.forEach(dateTime => { | ||
sortedInstantaneousValues[dateTime] = instantaneousMetrics[siteCode].instantaneousValues[dateTime]; | ||
}); | ||
instantaneousMetrics[siteCode].instantaneousValues = sortedInstantaneousValues; | ||
}); | ||
@@ -217,0 +230,0 @@ return instantaneousMetrics; |
{ | ||
"name": "wy-water", | ||
"version": "1.6.5", | ||
"version": "1.6.6", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "types": "lib/index.d.ts", |
17104
355