Most Used
Explore the most used utilities and tools in this showcase.
Note: These are mostly preferenced by the author and may not be the best choice for your project.
TZod - Utility Class(es)
The TZod
package is without a doubt the most useful and best built, maintained and tested package in this showcase. It provides a set of utility classes that are most useful in any project.
It can do transformations, validations, and more with ease.
Example
As you would with zod
, you import the t
namespace from @mvdlei/tzod
and use it to do what you need.
To functions
The to
namespace provides functions to convert values to a specific type.
Read more about TZod
here.
Web - Simplified Fetch
The web
package is a simplified and upgraded fetch tool. It provides an extended version of the fetch
function with defaults for headers and base URL.
This makes it super easy to send and receive JSON data from endpoints.
Example
As you would call fetch
, you import the api
function from @mvdlei/web
and use it to make requests.
Why is this useful? Because you don't have to worry about headers, base URL, or other configurations. It's all done for you.