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