This commit is contained in:
parent
42485166bf
commit
63662a6074
@ -1,6 +1,7 @@
|
|||||||
import express from "express";
|
import express from "express";
|
||||||
import { INFLUXDB_BUCKET, InfluxQueryAPI } from "../index";
|
import { INFLUXDB_BUCKET, InfluxQueryAPI } from "../index";
|
||||||
import { formatString } from "../utils/stringUtils";
|
import { formatString } from "../utils/stringUtils";
|
||||||
|
import { parseTimeToMilliseconds } from "../utils/timeUtils";
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const port = process.env.PORT || 3000;
|
const port = process.env.PORT || 3000;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* @param time the time to parse
|
* @param time the time to parse
|
||||||
* @returns the time in milliseconds
|
* @returns the time in milliseconds
|
||||||
*/
|
*/
|
||||||
function parseTimeToMilliseconds(time: string) {
|
export function parseTimeToMilliseconds(time: string) {
|
||||||
// Regular expression to match the numeric value and unit
|
// Regular expression to match the numeric value and unit
|
||||||
const regex = /^(\d+)([smhdwMy])$/;
|
const regex = /^(\d+)([smhdwMy])$/;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user