Parsing a value to match the schema. This is different to validation because it returns a new value.
Copy to clipboardimport * as v from "valibot"; import { personSchema } from "./schemas"; const person = v.parse(personSchema, data); // person is of type Person
| Library | Version | Downloads (/wk) | Optimizations | Error type | Mean | Compare | ||||
|---|---|---|---|---|---|---|---|---|---|---|
typia (createValidate) | Code snippet(Commented code is not benchmarked) | 12.0.2 | 259.06K | Precompiled | All errors | 6 μs | ||||
typia (validate) | Code snippet | 12.0.2 | 259.06K | Precompiled | All errors | 6 μs | 1.06x | |||