Back to packages list

Vals using zod

Description from the NPM package:
TypeScript-first schema declaration and validation library with static type inference
browserbase avatar
TopHackerNewsDailyEmail
@browserbase
Cron
Browserbase Browserbase offers a reliable, high performance serverless developer platform to run, manage, and monitor headless browsers at scale. Leverage our infrastructure to power your web automation and AI agents. Get started with Browserbase for free here . If you have any questions, reach out to developer@browserbase.com.
stevekrouse avatar
zod_demo_shared
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse
stevekrouse avatar
zod_demo_http
@stevekrouse
HTTP (preview)
This val shows how to break up your HTTP val into three vals: @stevekrouse/zod_demo_http (this val) @stevekrouse/zod_demo_frontend (client-side react component) @stevekrouse/zod_demo_shared (code that is imported in both vals, but only run on the backend) I have these vals in a folder. Unfortunately, folders are not publicly shareable, which is why I listed all the vals above. The Val Town full-screen editor makes it a lot easier to work with multiple vals at once. The trickiest and most interesting part of this particular demo is how we import just the zod type in the frontend which avoids the error if we were to import any real value from that shared file. In this sense, it's not a truly safe shared file. Open questions I don't know why zod types aren't working when imported via esm.sh I don't know how we would get zod validation working on the frontend without reimporting zod from esm.sh (which would then lose us types or require us to duplicate the zod code)
fshine99 avatar
bookReservationOnResy
@fshine99
Script
Forked from alp/bookReservationOnResy
emarref avatar
EnvironmentConfig
@emarref
Script
Utility to retrieve typesafe environment variable configuration with Zod. const { DB_HOST } = config({ DB_HOST: z.string(), }); // DB_HOST is a string, or an error is thrown.
charlypoly avatar
exampleTopHackerNewsDailyEmail
@charlypoly
Cron
An interactive, runnable TypeScript val by charlypoly
emarref avatar
IntentToReceive
@emarref
HTTP
Implements Xero's "Intent to Receive" signature validation webhook.
domingo1987 avatar
problemPython
@domingo1987
HTTP
// Privacy policy template in Markdown
yawnxyz avatar
aiImageExample
@yawnxyz
Script
// Function to handle image and text input using OpenAI's GPT-4-turbo
yawnxyz avatar
nighthawks
@yawnxyz
Script
This is nighthawks an experimental NPC character generator that remembers details about conversations. Import this into other workflows for now; a UI is coming soon!
xkonti avatar
gptApiTemplate
@xkonti
HTTP
Forked from xkonti/gameIdeaApi
xkonti avatar
gameIdeaApi
@xkonti
HTTP
This Val is a part of Creating GPT Actions with ValTown tutorial: Video on YouTube Article on xkonti.tech The GPT using it: Game Idea Exchange GPT
ckersey2 avatar
zodStringToJSON
@ckersey2
Script
Forked from freecrayon/zodStringToJSON
kmb avatar
bookReservationOnResy
@kmb
Script
Forked from alp/bookReservationOnResy
freecrayon avatar
zodStringToJSON
@freecrayon
Script
Useful when working with ZodFormData and you need to parse a text field that contains JSON. See https://www.val.town/v/freecrayon/zodStringToJSON_example for an example of how to use it.
arrudaricardo avatar
echo_http
@arrudaricardo
HTTP
An interactive, runnable TypeScript val by arrudaricardo