update things

This commit is contained in:
Ruben 2025-06-29 01:03:34 -05:00
commit 46b7c21b84
No known key found for this signature in database
GPG key ID: 8EA836555FB6D9A5
12 changed files with 272 additions and 10 deletions

View file

@ -0,0 +1,13 @@
import { z } from "zod";
import { fromZodError } from 'zod-validation-error';
export default function(data) {
// Draft content, validate `draft` front matter
let result = z.object({
draft: z.boolean().or(z.undefined()),
}).safeParse(data);
if(result.error) {
throw fromZodError(result.error);
}
}