anto
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
function convertStringToArray(string) {
|
||||
console.log(string)
|
||||
const numberStrings = string.replace(/[{}]/g, '').split(',');
|
||||
|
||||
// Trim whitespace and convert the string numbers to integers
|
||||
@@ -13,6 +12,13 @@ function filterAndSortMeasurementsByIds(measurements, ids) {
|
||||
.filter((measurement) => ids.includes(measurement.id))
|
||||
.sort((a, b) => new Date(a.timestamp) - new Date(b.timestamp));
|
||||
}
|
||||
function filterAndSortMeasurementsByNumber(measurements, Numbers) {
|
||||
// Filter measurements based on their position in the Numbers array
|
||||
const filteredMeasurements = Numbers.map(index => measurements[index - 1]).filter(measurement => measurement !== undefined);
|
||||
|
||||
// Sort the filtered measurements by their timestamp
|
||||
return filteredMeasurements.sort((a, b) => new Date(a.timestamp) - new Date(b.timestamp));
|
||||
}
|
||||
|
||||
function checkVideoPath(videos, name) {
|
||||
let res = true;
|
||||
|
||||
Reference in New Issue
Block a user