https://github.com/macklinu/neverthrow
A collection of utilities used alongside neverthrow
https://github.com/macklinu/neverthrow
neverthrow
Last synced: about 2 months ago
JSON representation
A collection of utilities used alongside neverthrow
- Host: GitHub
- URL: https://github.com/macklinu/neverthrow
- Owner: macklinu
- Created: 2025-06-20T15:37:26.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-29T19:32:03.000Z (5 months ago)
- Last Synced: 2025-10-02T21:39:22.738Z (5 months ago)
- Topics: neverthrow
- Language: TypeScript
- Homepage:
- Size: 194 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @macklinu/neverthrow
> A collection of utilities used alongside [neverthrow](https://github.com/supermacro/neverthrow)
## Installation
```sh
pnpm add neverthrow @macklinu/neverthrow
```
## Usage
This library is grouped into various modules by scope or library.
### `/zod`
If using this module, ensure you have [`zod`](https://zod.dev/) installed.
```sh
pnpm add zod
```
#### `zodParse()`
A wrapper around zod/v4's schema parsing functionality to convert it into a `Result`.
```ts
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)
```