remix-public-env
zod
remix-public-env | zod | |
---|---|---|
1 | 324 | |
6 | 33,303 | |
- | - | |
5.5 | 9.2 | |
4 months ago | 21 days ago | |
TypeScript | TypeScript | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
remix-public-env
-
Type-Safe Env Vars in Remix - A modern approach with ArkType
If you only want to see the code, check out the updates' diff here. Take a closer look at the second commit on that PR.
zod
-
How to make your Express app 9x faster (and type-safe)
Express.js does not have built-in request validation. You have to use a library like Zod.
- Zod: TypeScript-first schema validation with static type inference
- Fundamentals of React Native App Development: Dependencies, Performance, Native Modules, and Publishing Guide
-
NestJS vs. Ditsmod: Pipe Features
In this example, a controller method sets up a route that accepts a request body. Here, the pipe instance is passed directly in the @UsePipes() decorator. This way, the pipe's transform method receives the request body and validates it based on a prepared Zod schema.
-
Show HN: A tool to visualise Zod validation errors
I work on code generator that creates TypeScript SDKs from OpenAPI specs and Zod (https://zod.dev/) is a critical building block that I chose to power runtime validation in those SDKs. Depending on the complexity of a Zod schema, the resulting validation error message can contain a wall of JSON text - the serialised issues that were recorded during validation.
I wanted to try and create a small tool to help me better visualise and parse these errors. In code and the command line, we do also have the ability to pretty-print the errors but I still wanted a web UI which can let me share URLs for visualised errors.
I'm still iterating on it but would love any feedback if you do get to try it out.
-
Encore.ts — 3x faster than ElysiaJS & Hono
Encore.ts, as the name suggests, is designed from the ground up for TypeScript. But you can't actually run TypeScript: it first has to be compiled to JavaScript, by stripping all the type information. This means run-time type safety is much harder to achieve, which makes it difficult to do things like validating incoming requests, leading to solutions like Zod becoming popular for defining API schemas at runtime instead.
-
Understanding Genkit flows with Czech language tricks
Let's modify the pregenerated example flow, changing the name and input/output schemas. Genkit uses zod to define strongly typed schemas enforced even at runtime.
-
How to make your Express.js APIs 9x faster with Encore.ts
Express.js does not have built-in request validation. You have to use a library like Zod.
-
Handling custom error responses from ExpressoTS with TanStack Query, and NextJS
Here is the code for the request and response schemas. I'm using zod to do this on the front end:
-
Fullstack Serverless Starter with Hono.js, Cloudflare Workers, and Neon Postgres
Validation using Zod.
What are some alternatives?
class-validator - Decorator-based property validation for classes.
joi - The most powerful data validation library for JS [Moved to: https://github.com/sideway/joi]
typebox - Json Schema Type Builder with Static Type Resolution for TypeScript
Yup - Dead simple Object schema validation
ajv - The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)
io-ts - Runtime type system for IO decoding/encoding
Superstruct - A simple and composable way to validate data in JavaScript (and TypeScript).
class-transformer - Decorator-based transformation, serialization, and deserialization between objects and classes.
runtypes - Runtime validation for static types
react-hook-form - 📋 React Hooks for form state management and validation (Web + React Native)
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
zod-to-json-schema - Converts Zod schemas to Json schemas