npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sury

v11.0.0-alpha.4

Published

🧬 The fastest schema with next-gen DX

Readme

CI codecov sury npm rescript-schema npm

Sury (aka ReScript Schema) 🧬

The fastest schema with next-gen DX.

Highlights:

  • Works with plain JavaScript, TypeScript, and ReScript. You don't need to use any compiler.
  • The fastest parsing and validation library in the entire JavaScript ecosystem (benchmark)
  • Small JS footprint & tree-shakable API (Comparison with Zod and Valibot)
  • Implements the Standard Schema spec
  • Built-in JSON Schema support
  • Detailed and easy to understand error messages
  • Declarative transformations with automatic serialization
  • Immutable API with 100+ different operations
  • Flexible global config
  • Opt-in ReScript codegen from type definitions (ppx)

Also, you can use Sury as a building block for your own tools or use existing ones:

Documentation

⚠️ Be aware that Sury uses new Function for parsing. The approach is battle tested and has no known security issues. It's also used by TypeBox, Zod@4 and ArkType. Even Cloudflare Workers recently added support for it.

Resources

  • Welcome Sury - The fastest schema with next-gen DX (Dev.to)
  • ReScript Schema unique features (Dev.to)
  • Building and consuming REST API in ReScript with rescript-rest and Fastify (YouTube)

Comparison

Instead of relying on a few large functions with many methods, Sury follows Valibot's approach, where API design and source code is based on many small and independent functions, each with just a single task. This modular design has several advantages.

For example, this allows a bundler to use the import statements to remove code that is not needed. This way, only the code that is actually used gets into your production build. This can reduce the bundle size by up to 2 times compared to Zod.

Besides the individual bundle size, the overall size of the library is also significantly smaller.

At the same time Sury is the fastest composable validation library in the entire JavaScript ecosystem. This is achieved because of the JIT approach when an ultra optimized validator is created using new Function.

| | [email protected] | [email protected] | [email protected] | [email protected] | [email protected] | | ---------------------------------------- | ------------------------------------------------- | --------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------- | | Total size (min + gzip) | 14.1 kB | 25.9 kB | 31.4 kB | 12.6 kB | 45.9 kB | | Benchmark size (min + gzip) | 4.27 kB | 13.5 kB | 22.8 kB | 1.23 kB | 45.8 kB | | Parse with the same schema | 94,828 ops/ms | 8,437 ops/ms | 99,640 ops/ms (No transforms) | 1,721 ops/ms | 67,552 ops/ms | | Create schema & parse once | 166 ops/ms | 6 ops/ms | 111 ops/ms (No transforms) | 287 ops/ms | 11 ops/ms | | JSON Schema | S.toJSONSchema | z.toJSONSchema | 👑 | @valibot/to-json-schema | T.toJsonSchema | | Standard Schema | ✅ | ✅ | ❌ | ✅ | ✅ | | Eval-free | ❌ | ⭕ opt-out | ⭕ opt-in | ✅ | ⭕ opt-out | | Codegen-free (Doesn't need compiler) | ✅ | ✅ | ✅ | ✅ | ✅ | | Infered TS Type | S.Schema<{foo: string}, {foo: string}> | z.ZodObject<{foo: z.ZodString}, {}> | TObject<{foo: TString}> | v.ObjectSchema<{readonly foo: v.StringSchema<undefined>}, undefined> | Type<{foo: string}, {}> | | Ecosystem | ⭐️⭐️ | ⭐️⭐️⭐️⭐️⭐️ | ⭐️⭐️⭐️⭐️⭐️ | ⭐️⭐️⭐️ | ⭐️⭐️ |

Sponsorship

If you're enjoying Sury and want to give back, that would be rad!

Your sponsorship doesn't go towards anything specific – it's simply a wonderful way to say "thank you" and make me happy. 😁

Donate with USDT:

  • ERC20: 0x509fCF7C24A94a776eb92B56B9DA4aA145615529
  • TRC20: TFg5hKgkdcrFnPHNgYqfbp9yMyx25uaWrF

DM me on X/Twitter if you want to be featured or just to say hi! This would mean so much to me. ✨