A collection of utilities used alongside neverthrow
pnpm add neverthrow @macklinu/neverthrow
This library is grouped into various modules by scope or library.
If using this module, ensure you have zod
installed.
pnpm add zod
A wrapper around zod/v4's schema parsing functionality to convert it into a Result
.
import { zodParse } from '@macklinu/neverthrow/zod'
import { z } from 'zod/v4'
const Schema = z.string()
zodParse(Schema, 'hello') // => ok('hello')
zodParse(Schema, 1) // => err(z.ZodError)