@nortex/pretty-zod-error
v2.0.0
Published
Returns a pretty, colorful error message from Zod errors.
Downloads
49
Maintainers
Readme
pretty-zod-error
An extremely simple package to quickly log pretty @colinhacks/zod errors to the console.
Changelog 2.0.0:
- Renamed
logZodError
toprettifyZodError
to not cause confusion. - Added
logPrettyZodError
, which willconsole.log
output ofprettifyZodError
. - Added new
options
property toprettifyZodError
, 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