I found 10,000x faster TypeScript validator library

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • typebox

    Json Schema Type Builder with Static Type Resolution for TypeScript

  • Comparing with my library typescript-json, of course, I think that my library is much easier and stronger. As you know, typescript-json does not any extra schema definition. It only requires pure TypeScript type and only one line function call. However, typescript-json needs TypeScript compiler and additional plugin configuration on tsconfig.json. Therefore, if you're developing on JavaScript environment, typescript-json never can be adopted. In such case, TypeBox would be the best alternative solution.

  • typia

    Super-fast/easy runtime validations and serializations through transformation

  • Comparing with my library typescript-json, of course, I think that my library is much easier and stronger. As you know, typescript-json does not any extra schema definition. It only requires pure TypeScript type and only one line function call. However, typescript-json needs TypeScript compiler and additional plugin configuration on tsconfig.json. Therefore, if you're developing on JavaScript environment, typescript-json never can be adopted. In such case, TypeBox would be the best alternative solution.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • class-validator

    Decorator-based property validation for classes.

  • Also, title of before article was I made 1,000x faster TypeScript validator library, but today's benchmark is showing that typescript-json is maximum 6,500x times faster. It's just because I added a new library class-validator in the benchmark and it is much slower than previous zod. Of course, I've continuously tuned the performance, but it just improved the performance about 2x times only.

  • io-ts

    Runtime type system for IO decoding/encoding

  • Usage of TypeBox is similar with io-ts and zod, but it is much powerful and faster than them. Also, TypeBox can generate JSON schema very easily. Therefore, if you're looking for a validator library for new project and not suffering from legacy codes, I think TypeBox would be much better choice than io-ts and zod. TypeBox can totally replace them.

  • zod

    TypeScript-first schema validation with static type inference

  • Usage of TypeBox is similar with io-ts and zod, but it is much powerful and faster than them. Also, TypeBox can generate JSON schema very easily. Therefore, if you're looking for a validator library for new project and not suffering from legacy codes, I think TypeBox would be much better choice than io-ts and zod. TypeBox can totally replace them.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts