UNPKG

astro

Version:

Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

17 lines (16 loc) 521 B
import { AstroError, AstroErrorData } from "../../errors/index.js"; const VALID_PARAM_TYPES = ["string", "undefined"]; function validateGetStaticPathsParameter([key, value], route) { if (!VALID_PARAM_TYPES.includes(typeof value)) { throw new AstroError({ ...AstroErrorData.GetStaticPathsInvalidRouteParam, message: AstroErrorData.GetStaticPathsInvalidRouteParam.message(key, value, typeof value), location: { file: route } }); } } export { validateGetStaticPathsParameter };