LogoLogo

Schema Benchmarks

    • home
      Home

    • download_2
      Download

    • timer
      Initialization
    • check_circle
      Validation
    • output_circle
      Parsing
    • swap_horiz
      Codec
    • schema
      Standard Schema
    • format_quote
      String

    • error
      Stack
    • assignment_turned_in
      TypeScript

  • JSON Schema

    • data_object
      Schema to JSON
    • code
      JSON to Schema
    • verified
      Compliance

    • deployed_code
      Libraries

    • article
      Blog
Expand sidebarExpand sidebar
Benchmarks/ValidationValidation
github
GitHubGitHub
DiscordDiscord
PreferencesPreferences

Checking if a given value matches the schema. This is different to parsing because it doesn't return a new value.

Copy to clipboardCopy to clipboard
import * as v from "valibot"; import { personSchema } from "./schemas"; if (v.is(personSchema, data)) { // data is narrowed to Person }
Data
  • errorInvalid
  • check_circleValid
Optimizations
  • flash_offNone
  • codeJIT
  • buildPrecompiled
LibrarysortVersiondownload/wksortOptimizationsMeanarrow_upwardCompare
yup
Code snippetCode snippet
schema.isValidSync(data)
1.7.1n/aNone131 μs
runtypes
Code snippetCode snippet
schema.guard(data)
7.0.5n/aNone72 μs
1.82x
stat_1
superstruct
Code snippetCode snippet
is(data, schema)
2.0.2n/aNone50 μs
2.62x
stat_1
superstruct (schema.is)
Code snippetCode snippet
schema.is(data)
2.0.2n/aNone50 μs
2.64x
stat_1
@sapphire/shapeshift
Code snippetCode snippet
schema.is(data)
5.0.0n/aNone19 μs
6.9x
stat_1
@railway-ts/pipelines
Code snippetCode snippet
is(data, schema)
0.1.29n/aNone16 μs
8.41x
stat_1
effect
Code snippetCode snippet
const is = Schema.is(schema);
is(data);

(Setup code is not benchmarked)

4.1.2n/aNone8 μs
17.38x
stat_1
valibot
Code snippetCode snippet
v.is(schema, data)
1.5.0n/aNone6 μs
21.35x
stat_2
io-ts
Code snippetCode snippet
schema.is(data)
2.2.22n/aNone2 μs
54.84x
stat_3
Created by eskimojo for Open Circle

Preferences

Style
Theme
NPM browser
Code ligatures