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

  • 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.221.94MNone128 ns
valibot
Code snippetCode snippet
v.is(schema, data)
1.5.013.99MNone505 ns
3.93x
stat_minus_1
@railway-ts/pipelines
Code snippetCode snippet
is(data, schema)
0.1.2999None636 ns
4.96x
stat_minus_1
effect
Code snippetCode snippet
const is = Schema.is(schema);
is(data);

(Setup code is not benchmarked)

3.22.224.53MNone658 ns
5.13x
stat_minus_1
effect@rc
Code snippetCode snippet
const is = Schema.is(schema);
is(data);

(Setup code is not benchmarked)

4.0.0-rc.11224.53MNone701 ns
5.46x
stat_minus_1
superstruct
Code snippetCode snippet
is(data, schema)
2.0.24.73MNone10 μs
81.64x
stat_minus_1
superstruct (schema.is)
Code snippetCode snippet
schema.is(data)
2.0.24.73MNone11 μs
87.77x
stat_minus_1
yup
Code snippetCode snippet
schema.isValidSync(data)
1.7.18.58MNone82 μs
638.13x
stat_minus_1
runtypes
Code snippetCode snippet
schema.guard(data)
7.0.5187.42KNone173 μs
1_345.95x
stat_minus_2
@sapphire/shapeshift
Code snippetCode snippet
schema.is(data)
5.0.0n/aNone307 μs
2_389.09x
stat_minus_3
Created by eskimojo for Open Circle

Preferences

Style
Theme
NPM browser
Code ligatures