Buckets:
| import { z } from "zod" | |
| export function fn<T extends z.ZodType, Result>(schema: T, cb: (input: z.infer<T>) => Result) { | |
| const result = (input: z.infer<T>) => { | |
| const parsed = schema.parse(input) | |
| return cb(parsed) | |
| } | |
| result.force = (input: z.infer<T>) => cb(input) | |
| result.schema = schema | |
| return result | |
| } | |
Xet Storage Details
- Size:
- 321 Bytes
- Xet hash:
- afb8fb96bf5ae139cb4a5c3b8eebbe7f90eb2158e27bddfe311e6cf25f19a8a1
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.