Back to packages list

Vals using zod

Description from the NPM package:
TypeScript-first schema declaration and validation library with static type inference
xkonti avatar
videoGameIdeaGPT
@xkonti
http
The idea for the GPT is so that the user comes up with a fun idea for a Video Game. When the user submits the idea, the AI will submit it to the API. The API will return a different idea from the pool of ideas already submitted to the API. This makes this GPT kind-of multiplayer as you will likely get ideas for video games that other people submitted.
ckersey2 avatar
zodStringToJSON
@ckersey2
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.
kmb avatar
bookReservationOnResy
@kmb
script
An interactive, runnable TypeScript val by kmb
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
saolsen avatar
sudoku
@saolsen
script
An interactive, runnable TypeScript val by saolsen
case avatar
market_kelly_bet
@case
http
// Copied from https://github.com/Will-Howard/manifolio/blob/master/manifolio-ui/lib/calculate.ts
xkonti avatar
gptApiSchemaBuilder
@xkonti
script
An interactive, runnable TypeScript val by xkonti
saolsen avatar
connect4
@saolsen
script
An interactive, runnable TypeScript val by saolsen
webup avatar
parserSampleJSONZod
@webup
script
An interactive, runnable TypeScript val by webup
tmcw avatar
zodUnserializable
@tmcw
script
An interactive, runnable TypeScript val by tmcw
stevekrouse avatar
zodUnserializable
@stevekrouse
script
// Forked from @tmcw.zodExample
devdoshi avatar
validators
@devdoshi
script
Usage: async (rawInput) => { const validators = await @devdoshi.validators(); const inputSchema = validators.inputSchema(); const input = inputSchema.safeParse(rawInput); }
neverstew avatar
scheduleEmail
@neverstew
script
This val allows you to send me an email at a certain datetime. Fun!
tmcw avatar
zodExample
@tmcw
script
Zod Zod works great out-of-the-box with Val Town: just import it as npm:zod and parse something! Here's an example below. Tips Right now it's not possible to create a script val that immediately returns a Zod parser because its parsers can't be serialized. It's best to either expose a method that returns a parser, or to create and use the parser in the same val.