%PDF- %PDF-
| Direktori : /home2/rezakur1/www/portfolio/portfolio-rezakurnia/node_modules/astro/dist/core/routing/ |
| Current File : //home2/rezakur1/www/portfolio/portfolio-rezakurnia/node_modules/astro/dist/core/routing/params.js |
import { trimSlashes } from "../path.js";
import { validateGetStaticPathsParameter } from "./validation.js";
function stringifyParams(params, route) {
const validatedParams = Object.entries(params).reduce((acc, next) => {
validateGetStaticPathsParameter(next, route.component);
const [key, value] = next;
if (value !== void 0) {
acc[key] = typeof value === "string" ? trimSlashes(value) : value.toString();
}
return acc;
}, {});
return route.generate(validatedParams);
}
export {
stringifyParams
};