diff --git a/src/util.ts b/src/util.ts index fff08e5..74c0126 100644 --- a/src/util.ts +++ b/src/util.ts @@ -88,4 +88,11 @@ export function isEuropeanDST( date: Date ) { // Return true if within DST period return date >= start && date < end; +} + +export function createQS (params: Record): string { + const queryString = Object.entries(params) + .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`) + .join("&"); + return queryString; } \ No newline at end of file