From 059b9f63c44a56382b5fcb3fcfccb1798e54942a Mon Sep 17 00:00:00 2001 From: Elias Pettersen Chairi Date: Tue, 14 May 2024 12:00:51 +0200 Subject: [PATCH] doc: added JSDoc for sanitizeParams function --- packages/astro/src/core/routing/manifest/generator.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/astro/src/core/routing/manifest/generator.ts b/packages/astro/src/core/routing/manifest/generator.ts index 16d62e387e82..c61ce6dca4f6 100644 --- a/packages/astro/src/core/routing/manifest/generator.ts +++ b/packages/astro/src/core/routing/manifest/generator.ts @@ -2,6 +2,11 @@ import type { AstroConfig, RoutePart } from '../../../@types/astro.js'; import { compile } from 'path-to-regexp'; +/** + * Sanitizes the parameters object by normalizing string values and replacing certain characters with their URL-encoded equivalents. + * @param {Record} params - The parameters object to be sanitized. + * @returns {Record} The sanitized parameters object. + */ function sanitizeParams(params: Record): Record { return Object.fromEntries( Object.entries(params).map(([key, value]) => {