Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nortex-dev/pretty-zod-error
Convert ZodError to an issues string.
https://github.com/nortex-dev/pretty-zod-error
Last synced: 21 days ago
JSON representation
Convert ZodError to an issues string.
- Host: GitHub
- URL: https://github.com/nortex-dev/pretty-zod-error
- Owner: NorteX-dev
- Created: 2024-02-16T18:02:48.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-03-04T08:39:16.000Z (11 months ago)
- Last Synced: 2024-12-20T04:46:39.431Z (about 2 months ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@nortex/pretty-zod-error
- Size: 124 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### pretty-zod-error
An extremely simple package to quickly log pretty [@colinhacks/zod](https://github.com/colinhacks/zod) errors to the console.
Changelog 2.0.0:
- Renamed `logZodError` to `prettifyZodError` to not cause confusion.
- Added `logPrettyZodError`, which will `console.log` output of `prettifyZodError`.
- Added new `options` property to `prettifyZodError`, with options:
- withIndex: boolean - defines whether or not to prepend the issue index
- noColors: boolean - strip colors
- errorCode: boolean - defines whether or not to append the error code (the dimmed part)
- Cleaned & refactored up code