New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@codexsoft/metazod

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codexsoft/metazod

Provides typed metadata feature to zod. Library installation

latest
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

metazod

Provides typed metadata feature to zod. Library installation

npm install --save-dev @codexsoft/metazod 

Usage

Put this code into some *.d.ts file in your project:

import {} from '@codexsoft/metazod';

declare module 'zod' {
    interface IMeta {
        test: number;
        test2: string;
    }
}

Now you can write some typed metadata into schema:

const a = z.string().uuid().meta({test: 1, test2: ''})

And read it:

const b = a.getMeta().test;

FAQs

Package last updated on 16 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts