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

@criterium/zod

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@criterium/zod

create the zod query schema for a given zod entity schema

latest
Source
npmnpm
Version
0.4.0
Version published
Maintainers
1
Created
Source

@criterium/zod

@criterium/zod create zod query schema for given zod entity schema.

install

npm i @criterium/zod

usage

import { z } from 'zod';
import { queryOf } from '@criterium/zod';

const User = z.object({
  name: z.string(),
  address: z.object({
    street: z.string(),
  }),
});

const UserQuery = queryOf(User);

UserQuery.safeParse({
  address: {
    street: {
      $in: ['SF', 'NY'],
    },
  },
});
// success

UserQuery.safeParse({
  is_admin: {
    $eq: true,
  },
});
// fail

Keywords

mongodb

FAQs

Package last updated on 05 Mar 2026

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