staticql
Version:
Type-safe query engine for static content including Markdown, YAML, JSON, and more.
11 lines (10 loc) • 453 B
TypeScript
/**
* Performs a simple runtime validation of a value against a JSON-like schema.
*
* Supported types: "string", "number", "integer", "boolean", "date", "null", "array", "object".
*
* @param data - The value to validate.
* @param schema - The validation schema object.
* @throws Error if the data does not conform to the schema.
*/
export declare function simpleValidate(data: any, schema: any, path?: string, originData?: string | null): void;