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
io-ts
Code snippetCode snippet
schema.is(data)
2.2.223.84MNone124 ns
valibot
Code snippetCode snippet
v.is(schema, data)
1.5.032.05MNone580 ns
4.67x
stat_minus_1
@railway-ts/pipelines
Code snippetCode snippet
is(data, schema)
0.1.2959None667 ns
5.37x
stat_minus_1
effect
Code snippetCode snippet
const is = Schema.is(schema);
is(data);

(Setup code is not benchmarked)

4.1.266.82MNone745 ns
6x
stat_minus_1
superstruct
Code snippetCode snippet
is(data, schema)
2.0.2n/aNone7 μs
52.95x
stat_minus_1
superstruct (schema.is)
Code snippetCode snippet
schema.is(data)
2.0.2n/aNone7 μs
53.65x
stat_minus_1
yup
Code snippetCode snippet
schema.isValidSync(data)
1.7.1n/aNone81 μs
648.53x
stat_minus_2
@sapphire/shapeshift
Code snippetCode snippet
schema.is(data)
5.0.0n/aNone130 μs
1_046.16x
stat_minus_3
runtypes
Code snippetCode snippet
schema.guard(data)
7.0.5n/aNone189 μs
1_520.81x
stat_minus_3
Created by eskimojo for Open Circle

Preferences

Style
Theme
NPM browser
Code ligatures